home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / T / TransSkel 3.11.sit / TransSkel v 3.11 / Core / TransSkel.c < prev    next >
MacBinary  |  1994-02-20  |  61.4 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Sun Feb 20 19:04:32 1994, modified Sun Feb 20 19:04:32 1994, creator Think C, type ASCII, 60510 bytes "TransSkel.c" , at 0xecde 2054 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 54 72 61 6e 73 53 | 6b 65 6c 2e 63 00 00 00 |..TransS|kel.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 ec 5e 00 | 00 08 06 a9 8d ab 10 a9 |......^.|........|
|00000060| 8d ab 10 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 42 6a 00 00 |........|....Bj..|
|00000080| 2f 2a 0d 20 2a 20 54 72 | 61 6e 73 53 6b 65 6c 20 |/*. * Tr|ansSkel |
|00000090| 76 65 72 73 69 6f 6e 20 | 33 2e 31 31 20 2d 20 54 |version |3.11 - T|
|000000a0| 72 61 6e 73 70 6f 72 74 | 61 62 6c 65 20 4d 61 63 |ransport|able Mac|
|000000b0| 69 6e 74 6f 73 68 20 61 | 70 70 6c 69 63 61 74 69 |intosh a|pplicati|
|000000c0| 6f 6e 20 73 6b 65 6c 65 | 74 6f 6e 0d 20 2a 0d 20 |on skele|ton. *. |
|000000d0| 2a 20 50 6c 65 61 73 65 | 20 72 65 70 6f 72 74 20 |* Please| report |
|000000e0| 70 72 6f 62 6c 65 6d 73 | 20 74 6f 20 50 61 75 6c |problems| to Paul|
|000000f0| 20 44 75 42 6f 69 73 2e | 0d 20 2a 0d 20 2a 20 4e | DuBois.|. *. * N|
|00000100| 65 65 64 20 74 6f 20 74 | 65 73 74 3a 0d 20 2a 20 |eed to t|est:. * |
|00000110| 2d 20 57 69 6e 64 6f 77 | 20 64 72 61 67 67 69 6e |- Window| draggin|
|00000120| 67 2c 20 67 72 6f 77 69 | 6e 67 2c 20 7a 6f 6f 6d |g, growi|ng, zoom|
|00000130| 69 6e 67 20 6f 6e 20 6d | 75 6c 74 69 70 6c 65 20 |ing on m|ultiple |
|00000140| 6d 6f 6e 69 74 6f 72 20 | 73 79 73 74 65 6d 2e 0d |monitor |system..|
|00000150| 20 2a 09 0d 20 2a 20 54 | 68 69 6e 67 73 20 64 6f | *.. * T|hings do|
|00000160| 65 73 20 6e 6f 74 20 64 | 6f 20 79 65 74 3a 0d 20 |es not d|o yet:. |
|00000170| 2a 20 2d 20 4e 6f 20 6d | 6f 76 61 62 6c 65 20 6d |* - No m|ovable m|
|00000180| 6f 64 61 6c 20 64 69 61 | 6c 6f 67 20 73 75 70 70 |odal dia|log supp|
|00000190| 6f 72 74 2e 0d 20 2a 20 | 2d 20 55 73 65 20 66 6c |ort.. * |- Use fl|
|000001a0| 61 67 73 20 74 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |ags to i|mplement|
|000001b0| 20 22 68 69 64 65 20 77 | 69 6e 64 6f 77 20 6f 6e | "hide w|indow on|
|000001c0| 20 73 75 73 70 65 6e 64 | 20 69 66 20 76 69 73 69 | suspend| if visi|
|000001d0| 62 6c 65 22 2e 0d 20 2a | 0d 20 2a 0d 20 2a 20 54 |ble".. *|. *. * T|
|000001e0| 72 61 6e 73 53 6b 65 6c | 20 69 73 20 69 6e 20 74 |ransSkel| is in t|
|000001f0| 68 65 20 70 75 62 6c 69 | 63 20 64 6f 6d 61 69 6e |he publi|c domain|
|00000200| 20 61 6e 64 20 77 61 73 | 20 6f 72 69 67 69 6e 61 | and was| origina|
|00000210| 6c 6c 79 20 77 72 69 74 | 74 65 6e 20 62 79 3a 0d |lly writ|ten by:.|
|00000220| 20 2a 0d 20 2a 20 09 09 | 09 50 61 75 6c 20 44 75 | *. * ..|.Paul Du|
|00000230| 42 6f 69 73 0d 20 2a 20 | 09 09 09 57 69 73 63 6f |Bois. * |...Wisco|
|00000240| 6e 73 69 6e 20 52 65 67 | 69 6f 6e 61 6c 20 50 72 |nsin Reg|ional Pr|
|00000250| 69 6d 61 74 65 20 52 65 | 73 65 61 72 63 68 20 43 |imate Re|search C|
|00000260| 65 6e 74 65 72 0d 20 2a | 20 09 09 09 31 32 32 30 |enter. *| ...1220|
|00000270| 20 43 61 70 69 74 6f 6c | 20 43 6f 75 72 74 0d 20 | Capitol| Court. |
|00000280| 2a 20 09 09 09 4d 61 64 | 69 73 6f 6e 2c 20 57 49 |* ...Mad|ison, WI|
|00000290| 20 20 35 33 37 31 35 2d | 31 32 39 39 20 20 55 53 | 53715-|1299 US|
|000002a0| 41 0d 20 2a 0d 20 2a 20 | 49 6e 74 65 72 6e 65 74 |A. *. * |Internet|
|000002b0| 3a 09 64 75 62 6f 69 73 | 40 70 72 69 6d 61 74 65 |:.dubois|@primate|
|000002c0| 2e 77 69 73 63 2e 65 64 | 75 0d 20 2a 09 09 09 0d |.wisc.ed|u. *....|
|000002d0| 20 2a 20 41 64 64 69 74 | 69 6f 6e 61 6c 20 63 68 | * Addit|ional ch|
|000002e0| 61 6e 67 65 73 20 77 65 | 72 65 20 6d 61 64 65 20 |anges we|re made |
|000002f0| 62 79 3a 0d 20 2a 09 0d | 20 2a 20 09 09 09 4f 77 |by:. *..| * ...Ow|
|00000300| 65 6e 20 48 61 72 74 6e | 65 74 74 0d 20 2a 20 09 |en Hartn|ett. * .|
|00000310| 09 09 4f 48 4d 20 53 6f | 66 74 77 61 72 65 20 43 |..OHM So|ftware C|
|00000320| 6f 6d 70 61 6e 79 0d 20 | 2a 20 09 09 09 31 36 33 |ompany. |* ...163|
|00000330| 20 52 69 63 68 61 72 64 | 20 44 72 69 76 65 0d 20 | Richard| Drive. |
|00000340| 2a 20 09 09 09 54 69 76 | 65 72 74 6f 6e 2c 20 52 |* ...Tiv|erton, R|
|00000350| 49 20 30 32 38 37 38 20 | 20 55 53 41 0d 20 2a 20 |I 02878 | USA. * |
|00000360| 09 09 0d 20 2a 20 49 6e | 74 65 72 6e 65 74 3a 09 |... * In|ternet:.|
|00000370| 6f 6d 68 40 63 73 2e 62 | 72 6f 77 6e 2e 65 64 75 |omh@cs.b|rown.edu|
|00000380| 0d 20 2a 20 43 53 4e 45 | 54 3a 09 09 6f 6d 68 40 |. * CSNE|T:..omh@|
|00000390| 63 73 2e 62 72 6f 77 6e | 2e 65 64 75 2e 43 53 4e |cs.brown|.edu.CSN|
|000003a0| 45 54 20 09 09 0d 20 2a | 20 55 55 43 50 3a 09 09 |ET ... *| UUCP:..|
|000003b0| 75 75 6e 65 74 21 62 72 | 75 6e 69 78 21 6f 6d 68 |uunet!br|unix!omh|
|000003c0| 09 0d 20 2a 0d 20 2a 20 | 4f 77 65 6e 20 69 73 20 |.. *. * |Owen is |
|000003d0| 61 6c 73 6f 20 72 65 73 | 70 6f 6e 73 69 62 6c 65 |also res|ponsible|
|000003e0| 20 66 6f 72 20 74 68 65 | 20 70 6f 72 74 20 74 6f | for the| port to|
|000003f0| 20 54 48 49 4e 4b 20 50 | 61 73 63 61 6c 2e 0d 20 | THINK P|ascal.. |
|00000400| 2a 0d 20 2a 20 42 6f 62 | 20 53 63 68 75 6d 61 6b |*. * Bob| Schumak|
|00000410| 65 72 20 6a 6f 69 6e 65 | 64 20 74 68 65 20 63 61 |er joine|d the ca|
|00000420| 73 74 20 62 65 74 77 65 | 65 6e 20 76 65 72 73 69 |st betwe|en versi|
|00000430| 6f 6e 73 20 32 2e 30 20 | 61 6e 64 20 33 2e 30 2e |ons 2.0 |and 3.0.|
|00000440| 0d 20 2a 0d 20 2a 20 09 | 09 09 42 6f 62 20 53 63 |. *. * .|..Bob Sc|
|00000450| 68 75 6d 61 6b 65 72 0d | 20 2a 20 09 09 09 54 68 |humaker.| * ...Th|
|00000460| 65 20 41 4d 49 58 20 43 | 6f 72 70 6f 72 61 74 69 |e AMIX C|orporati|
|00000470| 6f 6e 0d 20 2a 20 09 09 | 09 31 38 38 31 20 4c 61 |on. * ..|.1881 La|
|00000480| 6e 64 69 6e 67 73 20 44 | 72 69 76 65 0d 20 2a 20 |ndings D|rive. * |
|00000490| 09 09 09 4d 6f 75 6e 74 | 61 69 6e 20 56 69 65 77 |...Mount|ain View|
|000004a0| 2c 20 43 41 20 39 34 30 | 34 33 2d 30 38 34 38 0d |, CA 940|43-0848.|
|000004b0| 20 2a 0d 20 2a 20 49 6e | 74 65 72 6e 65 74 3a 09 | *. * In|ternet:.|
|000004c0| 62 6f 62 40 6d 61 72 6b | 65 74 73 2e 61 6d 69 78 |bob@mark|ets.amix|
|000004d0| 2e 63 6f 6d 0d 20 2a 20 | 55 55 43 50 3a 09 09 7b |.com. * |UUCP:..{|
|000004e0| 73 75 6e 2c 20 75 75 6e | 65 74 2c 20 6e 65 74 63 |sun, uun|et, netc|
|000004f0| 6f 6d 7d 21 6d 61 72 6b | 65 74 73 21 62 6f 62 0d |om}!mark|ets!bob.|
|00000500| 20 2a 20 43 49 53 3a 09 | 09 09 37 32 32 32 37 2c | * CIS:.|..72227,|
|00000510| 32 31 30 33 0d 20 2a 20 | 41 4f 4c 3a 09 09 09 42 |2103. * |AOL:...B|
|00000520| 53 63 68 75 6d 61 6b 65 | 72 0d 20 2a 0d 20 2a 20 |Schumake|r. *. * |
|00000530| 54 68 69 73 20 76 65 72 | 73 69 6f 6e 20 6f 66 20 |This ver|sion of |
|00000540| 54 72 61 6e 73 53 6b 65 | 6c 20 69 73 20 77 72 69 |TransSke|l is wri|
|00000550| 74 74 65 6e 20 66 6f 72 | 20 54 48 49 4e 4b 20 43 |tten for| THINK C|
|00000560| 20 36 2e 30 2e 31 2e 0d | 20 2a 20 54 48 49 4e 4b | 6.0.1..| * THINK|
|00000570| 20 43 20 69 73 20 61 20 | 74 72 61 64 65 6d 61 72 | C is a |trademar|
|00000580| 6b 20 6f 66 3a 0d 20 2a | 0d 20 2a 20 09 53 79 6d |k of:. *|. * .Sym|
|00000590| 61 6e 74 65 63 20 43 6f | 72 70 6f 72 61 74 69 6f |antec Co|rporatio|
|000005a0| 6e 0d 20 2a 20 09 31 30 | 32 30 31 20 54 6f 72 72 |n. * .10|201 Torr|
|000005b0| 65 20 41 76 65 6e 75 65 | 0d 20 2a 20 09 43 75 70 |e Avenue|. * .Cup|
|000005c0| 65 72 74 69 6e 6f 2c 20 | 43 41 20 39 35 30 31 34 |ertino, |CA 95014|
|000005d0| 20 20 55 53 41 0d 20 2a | 0d 20 2a 20 52 65 66 65 | USA. *|. * Refe|
|000005e0| 72 65 6e 63 65 20 6b 65 | 79 3a 0d 20 2a 20 49 4d |rence ke|y:. * IM|
|000005f0| 09 09 49 6e 73 69 64 65 | 20 4d 61 63 69 6e 74 6f |..Inside| Macinto|
|00000600| 73 68 0d 20 2a 20 54 4e | 09 09 4d 61 63 69 6e 74 |sh. * TN|..Macint|
|00000610| 6f 73 68 20 54 65 63 68 | 6e 69 63 61 6c 20 4e 6f |osh Tech|nical No|
|00000620| 74 65 73 0d 20 2a 20 48 | 49 4e 09 09 48 75 6d 61 |tes. * H|IN..Huma|
|00000630| 6e 20 49 6e 74 65 72 66 | 61 63 65 20 4e 6f 74 65 |n Interf|ace Note|
|00000640| 73 0d 20 2a 20 50 47 4d | 46 09 09 50 72 6f 67 72 |s. * PGM|F..Progr|
|00000650| 61 6d 6d 65 72 27 73 20 | 47 75 69 64 65 20 74 6f |ammer's |Guide to|
|00000660| 20 4d 75 6c 74 69 46 69 | 6e 64 65 72 20 28 41 50 | MultiFi|nder (AP|
|00000670| 44 41 29 0d 20 2a 20 4d | 4d 57 5a 09 09 6d 6f 76 |DA). * M|MWZ..mov|
|00000680| 61 62 6c 65 2d 6d 6f 64 | 61 6c 2d 77 64 65 66 2d |able-mod|al-wdef-|
|00000690| 7a 65 6e 2e 74 78 74 20 | 28 66 74 70 2e 61 70 70 |zen.txt |(ftp.app|
|000006a0| 6c 65 2e 63 6f 6d 29 0d | 20 2a 20 54 50 4e 09 09 |le.com).| * TPN..|
|000006b0| 54 72 61 6e 73 53 6b 65 | 6c 20 50 72 6f 67 72 61 |TransSke|l Progra|
|000006c0| 6d 6d 65 72 27 73 20 4e | 6f 74 65 73 0d 20 2a 0d |mmer's N|otes. *.|
|000006d0| 20 2a 20 52 65 63 65 6e | 74 20 68 69 73 74 6f 72 | * Recen|t histor|
|000006e0| 79 20 69 73 20 67 69 76 | 65 6e 20 62 65 6c 6f 77 |y is giv|en below|
|000006f0| 2e 20 20 45 61 72 6c 69 | 65 72 20 63 68 61 6e 67 |. Earli|er chang|
|00000700| 65 20 68 69 73 74 6f 72 | 79 20 69 73 20 69 6e 20 |e histor|y is in |
|00000710| 54 53 48 69 73 74 6f 72 | 79 2e 0d 20 2a 20 49 66 |TSHistor|y.. * If|
|00000720| 20 79 6f 75 27 76 65 20 | 62 65 65 6e 20 77 72 69 | you've |been wri|
|00000730| 74 69 6e 67 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ting app|lication|
|00000740| 73 20 77 69 74 68 20 61 | 6e 20 65 61 72 6c 69 65 |s with a|n earlie|
|00000750| 72 20 72 65 6c 65 61 73 | 65 2c 20 52 45 41 44 20 |r releas|e, READ |
|00000760| 54 48 41 54 20 46 49 4c | 45 21 0d 20 2a 0d 20 2a |THAT FIL|E!. *. *|
|00000770| 20 30 36 20 46 65 62 20 | 39 34 20 52 65 6c 65 61 | 06 Feb |94 Relea|
|00000780| 73 65 20 33 2e 31 30 0d | 20 2a 20 2d 20 4d 6f 64 |se 3.10.| * - Mod|
|00000790| 69 66 69 65 64 20 65 6e | 74 69 72 65 20 6c 69 62 |ified en|tire lib|
|000007a0| 72 61 72 79 20 73 6f 75 | 72 63 65 20 73 6f 20 74 |rary sou|rce so t|
|000007b0| 68 61 74 20 69 74 20 63 | 61 6e 20 62 65 20 63 6f |hat it c|an be co|
|000007c0| 6d 70 69 6c 65 64 20 77 | 69 74 68 20 65 69 74 68 |mpiled w|ith eith|
|000007d0| 65 72 0d 20 2a 20 43 2d | 63 6f 6d 70 61 74 69 62 |er. * C-|compatib|
|000007e0| 6c 65 20 6f 72 20 50 61 | 73 63 61 6c 2d 63 6f 6d |le or Pa|scal-com|
|000007f0| 70 61 74 69 62 6c 65 20 | 62 69 6e 64 69 6e 67 73 |patible |bindings|
|00000800| 2e 20 20 54 68 69 73 20 | 61 6c 6c 6f 77 73 20 61 |. This |allows a|
|00000810| 20 62 69 6e 61 72 79 20 | 6c 69 62 72 61 72 79 0d | binary |library.|
|00000820| 20 2a 20 74 6f 20 62 65 | 20 63 6f 6d 70 69 6c 65 | * to be| compile|
|00000830| 64 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 6c 69 |d that c|an be li|
|00000840| 6e 6b 65 64 20 69 6e 74 | 6f 20 54 48 49 4e 4b 20 |nked int|o THINK |
|00000850| 50 61 73 63 61 6c 20 61 | 70 70 6c 69 63 61 74 69 |Pascal a|pplicati|
|00000860| 6f 6e 73 20 77 68 69 6c | 65 0d 20 2a 20 70 72 65 |ons whil|e. * pre|
|00000870| 73 65 72 76 69 6e 67 20 | 63 6f 6d 70 61 74 69 62 |serving |compatib|
|00000880| 69 6c 69 74 79 20 77 69 | 74 68 20 65 78 69 73 74 |ility wi|th exist|
|00000890| 69 6e 67 20 54 72 61 6e | 73 53 6b 65 6c 20 43 20 |ing Tran|sSkel C |
|000008a0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 20 20 54 |applicat|ions. T|
|000008b0| 68 69 73 0d 20 2a 20 6d | 6f 64 69 66 69 63 61 74 |his. * m|odificat|
|000008c0| 69 6f 6e 20 77 61 73 20 | 73 75 67 67 65 73 74 65 |ion was |suggeste|
|000008d0| 64 20 62 79 20 4c 69 6f | 6e 65 6c 20 43 6f 6e 73 |d by Lio|nel Cons|
|000008e0| 2c 20 77 68 6f 20 61 6c | 73 6f 20 63 6f 6e 74 72 |, who al|so contr|
|000008f0| 69 62 75 74 65 64 20 61 | 20 77 6f 72 6b 69 6e 67 |ibuted a| working|
|00000900| 0d 20 2a 20 70 72 6f 74 | 6f 74 79 70 65 20 61 6e |. * prot|otype an|
|00000910| 64 20 74 68 65 20 6d 61 | 6a 6f 72 20 70 6f 72 74 |d the ma|jor port|
|00000920| 69 6f 6e 20 6f 66 20 74 | 68 65 20 50 61 73 63 61 |ion of t|he Pasca|
|00000930| 6c 20 68 65 61 64 65 72 | 20 66 69 6c 65 2e 0d 20 |l header| file.. |
|00000940| 2a 20 2d 20 46 69 78 65 | 64 20 63 61 73 74 20 62 |* - Fixe|d cast b|
|00000950| 75 67 20 69 6e 20 53 6b | 65 6c 45 76 65 6e 74 4c |ug in Sk|elEventL|
|00000960| 6f 6f 70 28 29 2e 0d 20 | 2a 20 30 37 20 46 65 62 |oop().. |* 07 Feb|
|00000970| 20 39 34 0d 20 2a 20 2d | 20 53 6b 65 6c 41 70 70 | 94. * -| SkelApp|
|00000980| 6c 65 28 29 20 6e 6f 77 | 20 74 61 6b 65 73 20 61 |le() now| takes a|
|00000990| 6e 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 20 6f |n empty |string o|
|000009a0| 72 20 6e 69 6c 20 74 6f | 20 69 6e 64 69 63 61 74 |r nil to| indicat|
|000009b0| 65 20 6e 6f 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |e no app|lication|
|000009c0| 20 69 74 65 6d 2c 0d 20 | 2a 20 72 61 74 68 65 72 | item,. |* rather|
|000009d0| 20 74 68 61 6e 20 6e 69 | 6c 20 6f 6e 6c 79 2e 0d | than ni|l only..|
|000009e0| 20 2a 20 30 38 20 46 65 | 62 20 39 34 0d 20 2a 20 | * 08 Fe|b 94. * |
|000009f0| 2d 20 53 6b 65 6c 50 6f | 73 69 74 69 6f 6e 57 69 |- SkelPo|sitionWi|
|00000a00| 6e 64 6f 77 28 29 20 70 | 6f 73 69 74 69 6f 6e 73 |ndow() p|ositions|
|00000a10| 20 77 69 6e 64 6f 77 73 | 20 75 73 69 6e 67 20 74 | windows| using t|
|00000a20| 68 65 20 73 74 72 75 63 | 74 75 72 65 20 72 65 63 |he struc|ture rec|
|00000a30| 74 61 6e 67 6c 65 20 72 | 61 74 68 65 72 0d 20 2a |tangle r|ather. *|
|00000a40| 20 74 68 61 6e 20 74 68 | 65 20 63 6f 6e 74 65 6e | than th|e conten|
|00000a50| 74 20 72 65 63 74 61 6e | 67 6c 65 20 6e 6f 77 2e |t rectan|gle now.|
|00000a60| 20 20 47 69 76 65 20 62 | 65 74 74 65 72 20 70 6f | Give b|etter po|
|00000a70| 73 69 74 69 6f 6e 69 6e | 67 2e 0d 20 2a 0d 20 2a |sitionin|g.. *. *|
|00000a80| 20 31 37 20 46 65 62 20 | 39 34 20 52 65 6c 65 61 | 17 Feb |94 Relea|
|00000a90| 73 65 20 33 2e 31 31 0d | 20 2a 20 2d 20 4e 65 77 |se 3.11.| * - New|
|00000aa0| 20 63 6f 6e 76 65 6e 69 | 65 6e 63 65 20 66 75 6e | conveni|ence fun|
|00000ab0| 63 74 69 6f 6e 20 53 6b | 65 6c 54 65 73 74 52 65 |ction Sk|elTestRe|
|00000ac0| 63 74 56 69 73 69 62 6c | 65 28 29 20 74 6f 20 63 |ctVisibl|e() to c|
|00000ad0| 68 65 63 6b 20 77 68 65 | 74 68 65 72 20 6f 72 20 |heck whe|ther or |
|00000ae0| 6e 6f 74 20 61 0d 20 2a | 20 72 65 63 74 61 6e 67 |not a. *| rectang|
|00000af0| 6c 65 20 69 73 20 63 6f | 6d 70 6c 65 74 65 6c 79 |le is co|mpletely|
|00000b00| 20 63 6f 6e 74 61 69 6e | 65 64 20 77 69 74 68 69 | contain|ed withi|
|00000b10| 6e 20 74 68 65 20 64 65 | 73 6b 74 6f 70 20 72 65 |n the de|sktop re|
|00000b20| 67 69 6f 6e 2e 0d 20 2a | 20 2d 20 53 6b 65 6c 41 |gion.. *| - SkelA|
|00000b30| 6c 65 72 74 28 29 20 75 | 73 65 73 20 53 6b 65 6c |lert() u|ses Skel|
|00000b40| 54 65 73 74 52 65 63 74 | 56 69 73 69 62 6c 65 28 |TestRect|Visible(|
|00000b50| 29 20 74 6f 20 63 68 65 | 63 6b 20 77 68 65 74 68 |) to che|ck wheth|
|00000b60| 65 72 20 61 6e 20 61 6c | 65 72 74 20 77 69 6c 6c |er an al|ert will|
|00000b70| 20 62 65 0d 20 2a 20 65 | 6e 74 69 72 65 6c 79 20 | be. * e|ntirely |
|00000b80| 76 69 73 69 62 6c 65 20 | 77 68 65 6e 20 69 74 27 |visible |when it'|
|00000b90| 73 20 73 75 70 70 6f 73 | 65 64 20 74 6f 20 62 65 |s suppos|ed to be|
|00000ba0| 20 70 6f 73 69 74 69 6f | 6e 65 64 20 6f 6e 20 74 | positio|ned on t|
|00000bb0| 68 65 20 70 61 72 65 6e | 74 20 77 69 6e 64 6f 77 |he paren|t window|
|00000bc0| 2e 0d 20 2a 20 49 66 20 | 6e 6f 74 2c 20 69 74 27 |.. * If |not, it'|
|00000bd0| 73 20 70 6f 73 69 74 69 | 6f 6e 65 64 20 6f 6e 20 |s positi|oned on |
|00000be0| 74 68 65 20 70 61 72 65 | 6e 74 20 64 65 76 69 63 |the pare|nt devic|
|00000bf0| 65 20 69 6e 73 74 65 61 | 64 2e 0d 20 2a 20 2d 20 |e instea|d.. * - |
|00000c00| 57 68 65 6e 20 70 6f 73 | 69 74 69 6f 6e 20 74 79 |When pos|ition ty|
|00000c10| 70 65 20 69 73 20 73 6b | 65 6c 50 6f 73 69 74 69 |pe is sk|elPositi|
|00000c20| 6f 6e 4f 6e 50 61 72 65 | 6e 74 57 69 6e 64 2c 20 |onOnPare|ntWind, |
|00000c30| 53 6b 65 6c 47 65 74 52 | 65 66 65 72 65 6e 63 65 |SkelGetR|eference|
|00000c40| 52 65 63 74 28 29 20 6e | 6f 77 0d 20 2a 20 72 65 |Rect() n|ow. * re|
|00000c50| 74 75 72 6e 73 20 74 68 | 65 20 73 74 72 75 63 74 |turns th|e struct|
|00000c60| 75 72 65 20 72 65 63 74 | 61 6e 67 6c 65 20 72 61 |ure rect|angle ra|
|00000c70| 74 68 65 72 20 74 68 61 | 6e 20 74 68 65 20 63 6f |ther tha|n the co|
|00000c80| 6e 74 65 6e 74 20 72 65 | 63 74 61 6e 67 6c 65 2e |ntent re|ctangle.|
|00000c90| 0d 20 2a 20 2d 20 53 6b | 65 6c 50 6f 73 69 74 69 |. * - Sk|elPositi|
|00000ca0| 6f 6e 57 69 6e 64 6f 77 | 28 29 20 6e 6f 77 20 61 |onWindow|() now a|
|00000cb0| 63 63 6f 75 6e 74 73 20 | 66 6f 72 20 64 69 66 66 |ccounts |for diff|
|00000cc0| 65 72 65 6e 63 65 20 62 | 65 74 77 65 65 6e 20 77 |erence b|etween w|
|00000cd0| 69 64 74 68 20 6f 66 20 | 73 74 72 75 63 74 75 72 |idth of |structur|
|00000ce0| 65 0d 20 2a 20 61 6e 64 | 20 63 6f 6e 74 65 6e 74 |e. * and| content|
|00000cf0| 20 72 65 63 74 61 6e 67 | 6c 65 20 6f 66 20 77 69 | rectang|le of wi|
|00000d00| 6e 64 6f 77 20 74 6f 20 | 62 65 20 70 6f 73 69 74 |ndow to |be posit|
|00000d10| 69 6f 6e 65 64 2e 0d 20 | 2a 20 32 30 20 46 65 62 |ioned.. |* 20 Feb|
|00000d20| 20 39 34 0d 20 2a 20 2d | 20 50 61 73 63 61 6c 20 | 94. * -| Pascal |
|00000d30| 62 69 6e 64 69 6e 67 73 | 20 66 6f 72 20 74 68 65 |bindings| for the|
|00000d40| 20 69 6e 74 65 72 66 61 | 63 65 20 66 75 6e 63 74 | interfa|ce funct|
|00000d50| 69 6f 6e 73 20 61 72 65 | 20 6e 6f 77 20 73 74 61 |ions are| now sta|
|00000d60| 6e 64 61 72 64 2e 20 20 | 43 20 62 69 6e 64 69 6e |ndard. |C bindin|
|00000d70| 67 73 0d 20 2a 20 61 72 | 65 20 6e 6f 20 6c 6f 6e |gs. * ar|e no lon|
|00000d80| 67 65 72 20 75 73 65 64 | 2e 0d 20 2a 2f 0d 0d 0d |ger used|.. */...|
|00000d90| 2f 2a 0d 20 2a 20 54 68 | 65 20 66 6f 6c 6c 6f 77 |/*. * Th|e follow|
|00000da0| 69 6e 67 20 73 79 6d 62 | 6f 6c 20 63 6f 6e 74 72 |ing symb|ol contr|
|00000db0| 6f 6c 73 20 73 75 70 70 | 6f 72 74 20 66 6f 72 20 |ols supp|ort for |
|00000dc0| 28 6d 6f 64 65 6c 65 73 | 73 29 20 64 69 61 6c 6f |(modeles|s) dialo|
|00000dd0| 67 73 2e 0d 20 2a 20 22 | 23 64 65 66 69 6e 65 20 |gs.. * "|#define |
|00000de0| 73 75 70 70 6f 72 74 44 | 69 61 6c 6f 67 73 22 20 |supportD|ialogs" |
|00000df0| 65 6e 61 62 6c 65 73 20 | 73 75 70 70 6f 72 74 2e |enables |support.|
|00000e00| 0d 20 2a 20 22 23 75 6e | 64 65 66 20 73 75 70 70 |. * "#un|def supp|
|00000e10| 6f 72 74 44 69 61 6c 6f | 67 73 22 20 64 69 73 61 |ortDialo|gs" disa|
|00000e20| 62 6c 65 73 20 73 75 70 | 70 6f 72 74 2e 0d 20 2a |bles sup|port.. *|
|00000e30| 2f 0d 0d 23 20 64 65 66 | 69 6e 65 09 73 75 70 70 |/..# def|ine.supp|
|00000e40| 6f 72 74 44 69 61 6c 6f | 67 73 0d 0d 0d 23 20 69 |ortDialo|gs...# i|
|00000e50| 6e 63 6c 75 64 65 09 3c | 54 72 61 70 73 2e 68 3e |nclude.<|Traps.h>|
|00000e60| 0d 23 20 69 6e 63 6c 75 | 64 65 09 3c 47 65 73 74 |.# inclu|de.<Gest|
|00000e70| 61 6c 74 45 71 75 2e 68 | 3e 0d 23 20 69 6e 63 6c |altEqu.h|>.# incl|
|00000e80| 75 64 65 09 3c 45 50 50 | 43 2e 68 3e 0d 0d 0d 2f |ude.<EPP|C.h>.../|
|00000e90| 2a 0d 20 2a 20 54 72 61 | 6e 73 53 6b 65 6c 2e 68 |*. * Tra|nsSkel.h|
|00000ea0| 20 63 6f 6e 74 61 69 6e | 73 20 64 65 66 69 6e 65 | contain|s define|
|00000eb0| 73 2c 20 74 79 70 65 64 | 65 66 73 2c 20 61 6e 64 |s, typed|efs, and|
|00000ec0| 20 70 75 62 6c 69 63 20 | 66 75 6e 63 74 69 6f 6e | public |function|
|00000ed0| 0d 20 2a 20 70 72 6f 74 | 6f 74 79 70 65 73 0d 20 |. * prot|otypes. |
|00000ee0| 2a 2f 0d 0d 23 20 69 6e | 63 6c 75 64 65 09 22 54 |*/..# in|clude."T|
|00000ef0| 72 61 6e 73 53 6b 65 6c | 2e 68 22 0d 0d 23 20 69 |ransSkel|.h"..# i|
|00000f00| 66 6e 64 65 66 09 6e 69 | 6c 0d 23 20 64 65 66 69 |fndef.ni|l.# defi|
|00000f10| 6e 65 09 6e 69 6c 09 09 | 28 28 76 6f 69 64 20 2a |ne.nil..|((void *|
|00000f20| 29 20 30 29 0d 23 20 65 | 6e 64 69 66 0d 0d 2f 2a |) 0).# e|ndif../*|
|00000f30| 0d 20 2a 20 4e 65 77 28 | 54 79 70 65 4e 61 6d 65 |. * New(|TypeName|
|00000f40| 29 20 72 65 74 75 72 6e | 73 20 68 61 6e 64 6c 65 |) return|s handle|
|00000f50| 20 74 6f 20 6e 65 77 20 | 6f 62 6a 65 63 74 2c 20 | to new |object, |
|00000f60| 66 6f 72 20 61 6e 79 20 | 54 79 70 65 4e 61 6d 65 |for any |TypeName|
|00000f70| 2e 0d 20 2a 20 49 66 20 | 74 68 65 72 65 20 69 73 |.. * If |there is|
|00000f80| 20 69 6e 73 75 66 66 69 | 63 69 65 6e 74 20 6d 65 | insuffi|cient me|
|00000f90| 6d 6f 72 79 2c 20 74 68 | 65 20 72 65 73 75 6c 74 |mory, th|e result|
|00000fa0| 20 69 73 20 6e 69 6c 2e | 0d 20 2a 2f 0d 0d 23 20 | is nil.|. */..# |
|00000fb0| 64 65 66 69 6e 65 09 4e | 65 77 28 74 79 70 65 29 |define.N|ew(type)|
|00000fc0| 09 28 74 79 70 65 20 2a | 2a 29 20 4e 65 77 48 61 |.(type *|*) NewHa|
|00000fd0| 6e 64 6c 65 20 28 28 53 | 69 7a 65 29 20 73 69 7a |ndle ((S|ize) siz|
|00000fe0| 65 6f 66 20 28 74 79 70 | 65 29 29 0d 0d 0d 2f 2a |eof (typ|e)).../*|
|00000ff0| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 20 | -------|------- |
|00001000| 2a 2f 0d 2f 2a 20 49 6e | 74 65 72 6e 61 6c 20 74 |*/./* In|ternal t|
|00001010| 79 70 65 73 20 2a 2f 0d | 2f 2a 20 2d 2d 2d 2d 2d |ypes */.|/* -----|
|00001020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 20 2a 2f 0d 0d 0d 2f |--------|- */.../|
|00001030| 2a 0d 20 2a 20 50 72 69 | 76 61 74 65 20 64 61 74 |*. * Pri|vate dat|
|00001040| 61 20 74 79 70 65 73 20 | 66 6f 72 20 77 69 6e 64 |a types |for wind|
|00001050| 6f 77 20 61 6e 64 20 6d | 65 6e 75 20 68 61 6e 64 |ow and m|enu hand|
|00001060| 6c 65 72 73 0d 20 2a 2f | 0d 0d 74 79 70 65 64 65 |lers. */|..typede|
|00001070| 66 20 73 74 72 75 63 74 | 20 57 48 61 6e 64 6c 65 |f struct| WHandle|
|00001080| 72 09 57 48 61 6e 64 6c | 65 72 2c 20 2a 57 48 50 |r.WHandl|er, *WHP|
|00001090| 74 72 2c 20 2a 2a 57 48 | 48 61 6e 64 6c 65 3b 0d |tr, **WH|Handle;.|
|000010a0| 0d 73 74 72 75 63 74 20 | 57 48 61 6e 64 6c 65 72 |.struct |WHandler|
|000010b0| 0d 7b 0d 09 57 69 6e 64 | 6f 77 50 74 72 09 09 09 |.{..Wind|owPtr...|
|000010c0| 09 77 68 57 69 6e 64 3b | 09 09 2f 2a 20 77 69 6e |.whWind;|../* win|
|000010d0| 64 6f 77 2f 64 69 61 6c | 6f 67 20 74 6f 20 68 61 |dow/dial|og to ha|
|000010e0| 6e 64 6c 65 20 2a 2f 0d | 09 53 6b 65 6c 57 69 6e |ndle */.|.SkelWin|
|000010f0| 64 4d 6f 75 73 65 50 72 | 6f 63 50 74 72 09 77 68 |dMousePr|ocPtr.wh|
|00001100| 4d 6f 75 73 65 3b 09 2f | 2a 20 6d 6f 75 73 65 2d |Mouse;./|* mouse-|
|00001110| 63 6c 69 63 6b 20 68 61 | 6e 64 6c 65 72 20 2a 2f |click ha|ndler */|
|00001120| 0d 09 53 6b 65 6c 57 69 | 6e 64 4b 65 79 50 72 6f |..SkelWi|ndKeyPro|
|00001130| 63 50 74 72 09 09 77 68 | 4b 65 79 3b 09 09 2f 2a |cPtr..wh|Key;../*|
|00001140| 20 6b 65 79 2d 63 6c 69 | 63 6b 20 68 61 6e 64 6c | key-cli|ck handl|
|00001150| 65 72 20 2a 2f 0d 09 53 | 6b 65 6c 57 69 6e 64 55 |er */..S|kelWindU|
|00001160| 70 64 61 74 65 50 72 6f | 63 50 74 72 09 77 68 55 |pdatePro|cPtr.whU|
|00001170| 70 64 61 74 65 3b 09 2f | 2a 20 75 70 64 61 74 65 |pdate;./|* update|
|00001180| 20 68 61 6e 64 6c 65 72 | 20 2a 2f 0d 09 53 6b 65 | handler| */..Ske|
|00001190| 6c 57 69 6e 64 41 63 74 | 69 76 61 74 65 50 72 6f |lWindAct|ivatePro|
|000011a0| 63 50 74 72 09 77 68 41 | 63 74 69 76 61 74 65 3b |cPtr.whA|ctivate;|
|000011b0| 09 2f 2a 20 61 63 74 69 | 76 61 74 65 20 65 76 65 |./* acti|vate eve|
|000011c0| 6e 74 20 68 61 6e 64 6c | 65 72 20 2a 2f 0d 09 53 |nt handl|er */..S|
|000011d0| 6b 65 6c 57 69 6e 64 43 | 6c 6f 73 65 50 72 6f 63 |kelWindC|loseProc|
|000011e0| 50 74 72 09 77 68 43 6c | 6f 73 65 3b 09 2f 2a 20 |Ptr.whCl|ose;./* |
|000011f0| 63 6c 6f 73 65 20 22 65 | 76 65 6e 74 22 20 68 61 |close "e|vent" ha|
|00001200| 6e 64 6c 65 72 20 2a 2f | 0d 09 53 6b 65 6c 57 69 |ndler */|..SkelWi|
|00001210| 6e 64 43 6c 6f 62 62 65 | 72 50 72 6f 63 50 74 72 |ndClobbe|rProcPtr|
|00001220| 09 77 68 43 6c 6f 62 62 | 65 72 3b 09 2f 2a 20 77 |.whClobb|er;./* w|
|00001230| 69 6e 64 6f 77 20 64 69 | 73 70 6f 73 61 6c 20 70 |indow di|sposal p|
|00001240| 72 6f 63 20 2a 2f 0d 09 | 53 6b 65 6c 57 69 6e 64 |roc */..|SkelWind|
|00001250| 49 64 6c 65 50 72 6f 63 | 50 74 72 09 09 77 68 49 |IdleProc|Ptr..whI|
|00001260| 64 6c 65 3b 09 09 2f 2a | 20 6d 61 69 6e 20 6c 6f |dle;../*| main lo|
|00001270| 6f 70 20 69 64 6c 65 20 | 70 72 6f 63 2a 2f 0d 09 |op idle |proc*/..|
|00001280| 53 6b 65 6c 57 69 6e 64 | 5a 6f 6f 6d 50 72 6f 63 |SkelWind|ZoomProc|
|00001290| 50 74 72 09 09 77 68 5a | 6f 6f 6d 3b 09 09 2f 2a |Ptr..whZ|oom;../*|
|000012a0| 20 7a 6f 6f 6d 20 70 72 | 6f 63 2a 2f 0d 23 20 69 | zoom pr|oc*/.# i|
|000012b0| 66 64 65 66 09 73 75 70 | 70 6f 72 74 44 69 61 6c |fdef.sup|portDial|
|000012c0| 6f 67 73 0d 09 53 6b 65 | 6c 57 69 6e 64 45 76 65 |ogs..Ske|lWindEve|
|000012d0| 6e 74 50 72 6f 63 50 74 | 72 09 77 68 45 76 65 6e |ntProcPt|r.whEven|
|000012e0| 74 3b 09 2f 2a 20 65 76 | 65 6e 74 20 70 72 6f 63 |t;./* ev|ent proc|
|000012f0| 20 2a 2f 0d 23 20 65 6e | 64 69 66 0d 09 52 65 63 | */.# en|dif..Rec|
|00001300| 74 09 09 77 68 47 72 6f | 77 3b 09 09 09 09 2f 2a |t..whGro|w;..../*|
|00001310| 20 6c 69 6d 69 74 73 20 | 6f 6e 20 77 69 6e 64 6f | limits |on windo|
|00001320| 77 20 73 69 7a 69 6e 67 | 20 2a 2f 0d 09 42 6f 6f |w sizing| */..Boo|
|00001330| 6c 65 61 6e 09 09 77 68 | 53 69 7a 65 64 3b 09 09 |lean..wh|Sized;..|
|00001340| 09 2f 2a 20 74 72 75 65 | 20 3d 20 77 69 6e 64 6f |./* true| = windo|
|00001350| 77 20 77 61 73 20 72 65 | 73 69 7a 65 64 20 2a 2f |w was re|sized */|
|00001360| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 77 68 46 72 6f |..Boolea|n..whFro|
|00001370| 6e 74 4f 6e 6c 79 3b 09 | 09 2f 2a 20 69 64 6c 65 |ntOnly;.|./* idle|
|00001380| 20 6f 6e 6c 79 20 77 68 | 65 6e 20 77 69 6e 64 6f | only wh|en windo|
|00001390| 77 20 61 63 74 69 76 65 | 20 2a 2f 0d 09 73 68 6f |w active| */..sho|
|000013a0| 72 74 09 09 77 68 46 6c | 61 67 73 3b 09 09 09 2f |rt..whFl|ags;.../|
|000013b0| 2a 20 76 61 72 69 6f 75 | 73 20 66 6c 61 67 73 20 |* variou|s flags |
|000013c0| 2a 2f 0d 09 53 6b 65 6c | 57 69 6e 64 50 72 6f 70 |*/..Skel|WindProp|
|000013d0| 48 61 6e 64 6c 65 09 77 | 68 50 72 6f 70 65 72 74 |Handle.w|hPropert|
|000013e0| 69 65 73 3b 09 2f 2a 20 | 70 72 6f 70 65 72 74 79 |ies;./* |property|
|000013f0| 20 6c 69 73 74 20 2a 2f | 0d 09 57 48 48 61 6e 64 | list */|..WHHand|
|00001400| 6c 65 09 77 68 4e 65 78 | 74 3b 09 09 09 09 2f 2a |le.whNex|t;..../*|
|00001410| 20 6e 65 78 74 20 77 69 | 6e 64 6f 77 20 68 61 6e | next wi|ndow han|
|00001420| 64 6c 65 72 20 2a 2f 0d | 7d 3b 0d 0d 74 79 70 65 |dler */.|};..type|
|00001430| 64 65 66 20 73 74 72 75 | 63 74 20 4d 48 61 6e 64 |def stru|ct MHand|
|00001440| 6c 65 72 09 4d 48 61 6e | 64 6c 65 72 2c 20 2a 4d |ler.MHan|dler, *M|
|00001450| 48 50 74 72 2c 20 2a 2a | 4d 48 48 61 6e 64 6c 65 |HPtr, **|MHHandle|
|00001460| 3b 0d 0d 73 74 72 75 63 | 74 20 4d 48 61 6e 64 6c |;..struc|t MHandl|
|00001470| 65 72 0d 7b 0d 09 73 68 | 6f 72 74 09 09 09 09 09 |er.{..sh|ort.....|
|00001480| 6d 68 49 44 3b 09 09 2f | 2a 20 6d 65 6e 75 20 69 |mhID;../|* menu i|
|00001490| 64 20 2a 2f 0d 09 53 6b | 65 6c 4d 65 6e 75 53 65 |d */..Sk|elMenuSe|
|000014a0| 6c 65 63 74 50 72 6f 63 | 50 74 72 09 6d 68 53 65 |lectProc|Ptr.mhSe|
|000014b0| 6c 65 63 74 3b 09 2f 2a | 20 69 74 65 6d 20 73 65 |lect;./*| item se|
|000014c0| 6c 65 63 74 69 6f 6e 20 | 68 61 6e 64 6c 65 72 20 |lection |handler |
|000014d0| 2a 2f 0d 09 53 6b 65 6c | 4d 65 6e 75 43 6c 6f 62 |*/..Skel|MenuClob|
|000014e0| 62 65 72 50 72 6f 63 50 | 74 72 09 6d 68 43 6c 6f |berProcP|tr.mhClo|
|000014f0| 62 62 65 72 3b 09 2f 2a | 20 6d 65 6e 75 20 64 69 |bber;./*| menu di|
|00001500| 73 70 6f 73 61 6c 20 70 | 72 6f 63 20 2a 2f 0d 09 |sposal p|roc */..|
|00001510| 42 6f 6f 6c 65 61 6e 09 | 09 6d 68 53 75 62 4d 65 |Boolean.|.mhSubMe|
|00001520| 6e 75 3b 09 09 09 09 2f | 2a 20 77 68 65 74 68 65 |nu;..../|* whethe|
|00001530| 72 20 73 75 62 6d 65 6e | 75 20 2a 2f 0d 09 4d 48 |r submen|u */..MH|
|00001540| 48 61 6e 64 6c 65 09 6d | 68 4e 65 78 74 3b 09 09 |Handle.m|hNext;..|
|00001550| 09 09 09 2f 2a 20 6e 65 | 78 74 20 6d 65 6e 75 20 |.../* ne|xt menu |
|00001560| 68 61 6e 64 6c 65 72 20 | 2a 2f 0d 7d 3b 0d 0d 0d |handler |*/.};...|
|00001570| 2f 2a 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/* -----|--------|
|00001580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 20 2a |--------|------ *|
|000015a0| 2f 0d 2f 2a 20 50 72 6f | 74 6f 74 79 70 65 73 20 |/./* Pro|totypes |
|000015b0| 66 6f 72 20 69 6e 74 65 | 72 6e 61 6c 20 28 70 72 |for inte|rnal (pr|
|000015c0| 69 76 61 74 65 29 20 66 | 75 6e 63 74 69 6f 6e 73 |ivate) f|unctions|
|000015d0| 20 2a 2f 0d 2f 2a 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d | */./* -|--------|
|000015e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001600| 2d 2d 20 2a 2f 0d 0d 73 | 74 61 74 69 63 20 57 48 |-- */..s|tatic WH|
|00001610| 48 61 6e 64 6c 65 20 47 | 65 74 57 44 48 61 6e 64 |Handle G|etWDHand|
|00001620| 6c 65 72 20 28 57 69 6e | 64 6f 77 50 74 72 20 77 |ler (Win|dowPtr w|
|00001630| 29 3b 0d 73 74 61 74 69 | 63 20 57 48 48 61 6e 64 |);.stati|c WHHand|
|00001640| 6c 65 20 47 65 74 57 48 | 61 6e 64 6c 65 72 20 28 |le GetWH|andler (|
|00001650| 57 69 6e 64 6f 77 50 74 | 72 20 77 29 3b 0d 73 74 |WindowPt|r w);.st|
|00001660| 61 74 69 63 20 57 48 48 | 61 6e 64 6c 65 20 47 65 |atic WHH|andle Ge|
|00001670| 74 44 48 61 6e 64 6c 65 | 72 20 28 44 69 61 6c 6f |tDHandle|r (Dialo|
|00001680| 67 50 74 72 20 74 68 65 | 44 69 61 6c 6f 67 29 3b |gPtr the|Dialog);|
|00001690| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 44 65 74 |.static |void Det|
|000016a0| 61 63 68 57 44 48 61 6e | 64 6c 65 72 20 28 57 48 |achWDHan|dler (WH|
|000016b0| 48 61 6e 64 6c 65 20 77 | 68 29 3b 0d 0d 73 74 61 |Handle w|h);..sta|
|000016c0| 74 69 63 20 76 6f 69 64 | 20 44 6f 4d 65 6e 75 43 |tic void| DoMenuC|
|000016d0| 6f 6d 6d 61 6e 64 20 28 | 6c 6f 6e 67 20 63 6f 6d |ommand (|long com|
|000016e0| 6d 61 6e 64 29 3b 0d 73 | 74 61 74 69 63 20 76 6f |mand);.s|tatic vo|
|000016f0| 69 64 20 44 6f 4d 65 6e | 75 48 6f 6f 6b 20 28 76 |id DoMen|uHook (v|
|00001700| 6f 69 64 29 3b 0d 0d 73 | 74 61 74 69 63 20 76 6f |oid);..s|tatic vo|
|00001710| 69 64 20 44 6f 4d 6f 75 | 73 65 20 28 57 48 48 61 |id DoMou|se (WHHa|
|00001720| 6e 64 6c 65 20 68 2c 20 | 45 76 65 6e 74 52 65 63 |ndle h, |EventRec|
|00001730| 6f 72 64 20 2a 74 68 65 | 45 76 65 6e 74 29 3b 0d |ord *the|Event);.|
|00001740| 73 74 61 74 69 63 20 76 | 6f 69 64 20 44 6f 4b 65 |static v|oid DoKe|
|00001750| 79 20 28 57 48 48 61 6e | 64 6c 65 20 68 2c 20 63 |y (WHHan|dle h, c|
|00001760| 68 61 72 20 63 68 2c 20 | 75 6e 73 69 67 6e 65 64 |har ch, |unsigned|
|00001770| 20 63 68 61 72 20 63 6f | 64 65 2c 20 73 68 6f 72 | char co|de, shor|
|00001780| 74 20 6d 6f 64 73 29 3b | 0d 73 74 61 74 69 63 20 |t mods);|.static |
|00001790| 76 6f 69 64 20 44 6f 55 | 70 64 61 74 65 20 28 57 |void DoU|pdate (W|
|000017a0| 48 48 61 6e 64 6c 65 20 | 68 29 3b 0d 73 74 61 74 |HHandle |h);.stat|
|000017b0| 69 63 20 76 6f 69 64 20 | 44 6f 41 63 74 69 76 61 |ic void |DoActiva|
|000017c0| 74 65 20 28 57 48 48 61 | 6e 64 6c 65 20 68 2c 20 |te (WHHa|ndle h, |
|000017d0| 42 6f 6f 6c 65 61 6e 20 | 61 63 74 69 76 65 29 3b |Boolean |active);|
|000017e0| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 44 6f 43 |.static |void DoC|
|000017f0| 6c 6f 73 65 20 28 57 48 | 48 61 6e 64 6c 65 20 68 |lose (WH|Handle h|
|00001800| 29 3b 0d 73 74 61 74 69 | 63 20 76 6f 69 64 20 44 |);.stati|c void D|
|00001810| 6f 43 6c 6f 62 62 65 72 | 20 28 57 48 48 61 6e 64 |oClobber| (WHHand|
|00001820| 6c 65 20 68 29 3b 0d 0d | 73 74 61 74 69 63 20 42 |le h);..|static B|
|00001830| 6f 6f 6c 65 61 6e 20 44 | 6f 44 69 61 6c 6f 67 20 |oolean D|oDialog |
|00001840| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 74 68 |(EventRe|cord *th|
|00001850| 65 45 76 65 6e 74 29 3b | 0d 0d 73 74 61 74 69 63 |eEvent);|..static|
|00001860| 20 76 6f 69 64 20 44 6f | 47 72 6f 77 20 28 57 48 | void Do|Grow (WH|
|00001870| 48 61 6e 64 6c 65 20 68 | 2c 20 50 6f 69 6e 74 20 |Handle h|, Point |
|00001880| 73 74 61 72 74 50 74 29 | 3b 0d 73 74 61 74 69 63 |startPt)|;.static|
|00001890| 20 76 6f 69 64 20 44 6f | 5a 6f 6f 6d 20 28 57 48 | void Do|Zoom (WH|
|000018a0| 48 61 6e 64 6c 65 20 68 | 2c 20 73 68 6f 72 74 20 |Handle h|, short |
|000018b0| 70 61 72 74 43 6f 64 65 | 29 3b 0d 0d 0d 2f 2a 20 |partCode|);.../* |
|000018c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000018d0| 2d 2d 20 2a 2f 0d 2f 2a | 20 49 6e 74 65 72 6e 61 |-- */./*| Interna|
|000018e0| 6c 20 76 61 72 69 61 62 | 6c 65 73 20 2a 2f 0d 2f |l variab|les */./|
|000018f0| 2a 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |* ------|--------|
|00001900| 2d 2d 2d 2d 20 2a 2f 0d | 0d 0d 2f 2a 0d 20 2a 20 |---- */.|../*. * |
|00001910| 57 69 6e 64 6f 77 20 61 | 6e 64 20 6d 65 6e 75 20 |Window a|nd menu |
|00001920| 68 61 6e 64 6c 65 72 20 | 76 61 72 69 61 62 6c 65 |handler |variable|
|00001930| 73 2e 0d 20 2a 0d 20 2a | 20 77 68 4c 69 73 74 20 |s.. *. *| whList |
|00001940| 61 6e 64 20 6d 68 4c 69 | 73 74 20 61 72 65 20 74 |and mhLi|st are t|
|00001950| 68 65 20 6c 69 73 74 73 | 20 6f 66 20 77 69 6e 64 |he lists| of wind|
|00001960| 6f 77 20 61 6e 64 20 6d | 65 6e 75 20 68 61 6e 64 |ow and m|enu hand|
|00001970| 6c 65 72 73 2e 0d 20 2a | 20 6d 68 43 6c 6f 62 4f |lers.. *| mhClobO|
|00001980| 6e 52 6d 76 65 20 69 73 | 20 74 72 75 65 20 69 66 |nRmve is| true if|
|00001990| 20 74 68 65 20 6d 65 6e | 75 20 68 61 6e 64 6c 65 | the men|u handle|
|000019a0| 72 20 64 69 73 70 6f 73 | 61 6c 20 70 72 6f 63 0d |r dispos|al proc.|
|000019b0| 20 2a 20 69 73 20 74 6f | 20 62 65 20 63 61 6c 6c | * is to| be call|
|000019c0| 65 64 20 77 68 65 6e 20 | 61 20 68 61 6e 64 6c 65 |ed when |a handle|
|000019d0| 72 20 69 73 20 72 65 6d | 6f 76 65 64 2e 20 20 49 |r is rem|oved. I|
|000019e0| 74 20 69 73 20 74 65 6d | 70 6f 72 61 72 69 6c 79 |t is tem|porarily|
|000019f0| 20 73 65 74 0d 20 2a 20 | 66 61 6c 73 65 20 77 68 | set. * |false wh|
|00001a00| 65 6e 20 68 61 6e 64 6c | 65 72 73 20 61 72 65 20 |en handl|ers are |
|00001a10| 69 6e 73 74 61 6c 6c 65 | 64 20 66 6f 72 20 6d 65 |installe|d for me|
|00001a20| 6e 75 73 20 74 68 61 74 | 20 61 6c 72 65 61 64 79 |nus that| already|
|00001a30| 0d 20 2a 20 68 61 76 65 | 20 68 61 6e 64 6c 65 72 |. * have| handler|
|00001a40| 73 20 2d 20 74 68 65 20 | 6f 6c 64 20 68 61 6e 64 |s - the |old hand|
|00001a50| 6c 65 72 20 69 73 20 72 | 65 6d 6f 76 65 64 20 57 |ler is r|emoved W|
|00001a60| 49 54 48 4f 55 54 20 63 | 61 6c 6c 69 6e 67 20 74 |ITHOUT c|alling t|
|00001a70| 68 65 0d 20 2a 20 64 69 | 73 70 6f 73 61 6c 20 70 |he. * di|sposal p|
|00001a80| 72 6f 63 2e 20 20 54 68 | 65 20 65 66 66 65 63 74 |roc. Th|e effect|
|00001a90| 20 69 73 20 74 6f 20 72 | 65 70 6c 61 63 65 20 74 | is to r|eplace t|
|00001aa0| 68 65 20 68 61 6e 64 6c | 65 72 20 66 6f 72 20 74 |he handl|er for t|
|00001ab0| 68 65 20 6d 65 6e 75 0d | 20 2a 20 77 69 74 68 6f |he menu.| * witho|
|00001ac0| 75 74 20 64 65 73 74 72 | 6f 79 69 6e 67 20 74 68 |ut destr|oying th|
|00001ad0| 65 20 6d 65 6e 75 20 69 | 74 73 65 6c 66 2e 0d 20 |e menu i|tself.. |
|00001ae0| 2a 0d 20 2a 20 64 72 61 | 67 52 65 63 74 20 64 65 |*. * dra|gRect de|
|00001af0| 74 65 72 6d 69 6e 65 73 | 20 74 68 65 20 6c 69 6d |termines| the lim|
|00001b00| 69 74 73 20 6f 6e 20 77 | 69 6e 64 6f 77 20 64 72 |its on w|indow dr|
|00001b10| 61 67 67 69 6e 67 2e 20 | 20 49 74 20 69 73 20 73 |agging. | It is s|
|00001b20| 65 74 20 69 6e 0d 20 2a | 20 53 6b 65 6c 49 6e 69 |et in. *| SkelIni|
|00001b30| 74 28 29 20 74 6f 20 74 | 68 65 20 62 6f 75 6e 64 |t() to t|he bound|
|00001b40| 69 6e 67 20 62 6f 78 20 | 6f 66 20 74 68 65 20 64 |ing box |of the d|
|00001b50| 65 73 6b 74 6f 70 20 72 | 65 67 69 6f 6e 20 69 6e |esktop r|egion in|
|00001b60| 73 65 74 20 62 79 20 34 | 20 70 69 78 65 6c 73 2e |set by 4| pixels.|
|00001b70| 0d 20 2a 0d 20 2a 20 67 | 72 6f 77 52 65 63 74 20 |. *. * g|rowRect |
|00001b80| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 64 65 66 |contains| the def|
|00001b90| 61 75 6c 74 20 6c 69 6d | 69 74 73 20 6f 6e 20 77 |ault lim|its on w|
|00001ba0| 69 6e 64 6f 77 20 73 69 | 7a 69 6e 67 2e 20 20 49 |indow si|zing. I|
|00001bb0| 74 20 69 73 20 73 65 74 | 20 69 6e 0d 20 2a 20 53 |t is set| in. * S|
|00001bc0| 6b 65 6c 49 6e 69 74 28 | 29 2e 20 20 54 68 65 20 |kelInit(|). The |
|00001bd0| 6c 6f 77 65 72 20 6c 69 | 6d 69 74 73 20 6f 6e 20 |lower li|mits on |
|00001be0| 77 69 6e 64 6f 77 20 73 | 69 7a 69 6e 67 20 6f 66 |window s|izing of|
|00001bf0| 20 38 30 20 70 69 78 65 | 6c 73 20 62 6f 74 68 20 | 80 pixe|ls both |
|00001c00| 64 69 72 65 63 74 69 6f | 6e 73 0d 20 2a 20 69 73 |directio|ns. * is|
|00001c10| 20 73 75 66 66 69 63 69 | 65 6e 74 20 74 6f 20 61 | suffici|ent to a|
|00001c20| 6c 6c 6f 77 20 74 65 78 | 74 20 77 69 6e 64 6f 77 |llow tex|t window|
|00001c30| 73 20 72 6f 6f 6d 20 74 | 6f 20 64 72 61 77 20 61 |s room t|o draw a|
|00001c40| 20 67 72 6f 77 20 62 6f | 78 20 61 6e 64 20 73 63 | grow bo|x and sc|
|00001c50| 72 6f 6c 6c 0d 20 2a 20 | 62 61 72 73 20 77 69 74 |roll. * |bars wit|
|00001c60| 68 6f 75 74 20 68 61 76 | 69 6e 67 20 74 68 65 20 |hout hav|ing the |
|00001c70| 74 68 75 6d 62 20 61 6e | 64 20 61 72 72 6f 77 73 |thumb an|d arrows|
|00001c80| 20 6f 76 65 72 6c 61 70 | 2e 20 20 54 68 65 20 75 | overlap|. The u|
|00001c90| 70 70 65 72 20 6c 69 6d | 69 74 73 20 61 72 65 0d |pper lim|its are.|
|00001ca0| 20 2a 20 64 65 74 65 72 | 6d 69 6e 65 64 20 66 72 | * deter|mined fr|
|00001cb0| 6f 6d 20 74 68 65 20 73 | 63 72 65 65 6e 20 73 69 |om the s|creen si|
|00001cc0| 7a 65 2e 20 28 50 72 6f | 62 61 62 6c 79 20 69 6e |ze. (Pro|bably in|
|00001cd0| 63 6f 72 72 65 63 74 6c | 79 20 66 6f 72 20 74 68 |correctl|y for th|
|00001ce0| 65 20 63 61 73 65 20 6f | 66 20 3e 20 31 0d 20 2a |e case o|f > 1. *|
|00001cf0| 20 73 63 72 65 65 6e 2e | 29 0d 20 2a 20 54 68 65 | screen.|). * The|
|00001d00| 73 65 20 64 65 66 61 75 | 6c 74 20 76 61 6c 75 65 |se defau|lt value|
|00001d10| 73 20 6d 61 79 20 62 65 | 20 63 68 61 6e 67 65 64 |s may be| changed|
|00001d20| 20 69 66 20 77 69 74 68 | 20 53 6b 65 6c 47 72 6f | if with| SkelGro|
|00001d30| 77 42 6f 75 6e 64 73 20 | 69 66 20 74 68 65 79 20 |wBounds |if they |
|00001d40| 61 72 65 0d 20 2a 20 6e | 6f 74 20 61 70 70 72 6f |are. * n|ot appro|
|00001d50| 70 72 69 61 74 65 2e 0d | 20 2a 0d 20 2a 20 7a 6f |priate..| *. * zo|
|00001d60| 6f 6d 50 72 6f 63 20 69 | 73 20 74 68 65 20 64 65 |omProc i|s the de|
|00001d70| 66 61 75 6c 74 20 7a 6f | 6f 6d 20 70 72 6f 63 65 |fault zo|om proce|
|00001d80| 64 75 72 65 20 74 6f 20 | 75 73 65 20 69 66 20 74 |dure to |use if t|
|00001d90| 68 65 20 77 69 6e 64 6f | 77 20 64 6f 65 73 20 6e |he windo|w does n|
|00001da0| 6f 74 20 68 61 76 65 0d | 20 2a 20 6f 6e 65 20 6f |ot have.| * one o|
|00001db0| 66 20 69 74 73 20 6f 77 | 6e 2e 20 20 7a 6f 6f 6d |f its ow|n. zoom|
|00001dc0| 50 72 6f 63 20 6d 61 79 | 20 62 65 20 6e 69 6c 2c |Proc may| be nil,|
|00001dd0| 20 69 6e 20 77 68 69 63 | 68 20 63 61 73 65 20 74 | in whic|h case t|
|00001de0| 68 65 20 64 65 66 61 75 | 6c 74 20 69 73 20 74 6f |he defau|lt is to|
|00001df0| 20 7a 6f 6f 6d 0d 20 2a | 20 74 6f 20 6a 75 73 74 | zoom. *| to just|
|00001e00| 20 61 62 6f 75 74 20 66 | 75 6c 6c 20 77 69 6e 64 | about f|ull wind|
|00001e10| 6f 77 20 73 69 7a 65 2e | 0d 20 2a 0d 20 2a 20 6d |ow size.|. *. * m|
|00001e20| 68 44 72 61 77 42 61 72 | 4f 6e 52 6d 76 65 20 64 |hDrawBar|OnRmve d|
|00001e30| 65 74 65 72 6d 69 6e 65 | 73 20 77 68 65 74 68 65 |etermine|s whethe|
|00001e40| 72 20 74 68 65 20 6d 65 | 6e 75 20 62 61 72 20 69 |r the me|nu bar i|
|00001e50| 73 20 72 65 64 72 61 77 | 6e 20 62 79 0d 20 2a 20 |s redraw|n by. * |
|00001e60| 53 6b 65 6c 52 6d 76 65 | 4d 65 6e 75 28 29 20 61 |SkelRmve|Menu() a|
|00001e70| 66 74 65 72 20 74 61 6b | 69 6e 67 20 61 20 6d 65 |fter tak|ing a me|
|00001e80| 6e 75 20 6f 75 74 20 6f | 66 20 74 68 65 20 6d 65 |nu out o|f the me|
|00001e90| 6e 75 20 62 61 72 2e 20 | 20 4e 6f 72 6d 61 6c 6c |nu bar. | Normall|
|00001ea0| 79 0d 20 2a 20 69 74 27 | 73 20 74 72 75 65 2c 20 |y. * it'|s true, |
|00001eb0| 62 75 74 20 53 6b 65 6c | 43 6c 6f 62 62 65 72 28 |but Skel|Clobber(|
|00001ec0| 29 20 73 65 74 73 20 69 | 74 20 66 61 6c 73 65 20 |) sets i|t false |
|00001ed0| 74 65 6d 70 6f 72 61 72 | 69 6c 79 20 74 6f 20 61 |temporar|ily to a|
|00001ee0| 76 6f 69 64 0d 20 2a 20 | 66 6c 69 63 6b 65 72 20 |void. * |flicker |
|00001ef0| 61 73 20 65 61 63 68 20 | 6d 65 6e 75 20 69 73 20 |as each |menu is |
|00001f00| 72 65 6d 6f 76 65 64 2e | 0d 20 2a 2f 0d 0d 0d 73 |removed.|. */...s|
|00001f10| 74 61 74 69 63 20 57 48 | 48 61 6e 64 6c 65 09 77 |tatic WH|Handle.w|
|00001f20| 68 4c 69 73 74 20 3d 20 | 28 57 48 48 61 6e 64 6c |hList = |(WHHandl|
|00001f30| 65 29 20 6e 69 6c 3b 0d | 73 74 61 74 69 63 20 52 |e) nil;.|static R|
|00001f40| 65 63 74 09 09 64 72 61 | 67 52 65 63 74 3b 0d 73 |ect..dra|gRect;.s|
|00001f50| 74 61 74 69 63 20 52 65 | 63 74 09 09 67 72 6f 77 |tatic Re|ct..grow|
|00001f60| 52 65 63 74 3b 0d 73 74 | 61 74 69 63 20 53 6b 65 |Rect;.st|atic Ske|
|00001f70| 6c 57 69 6e 64 5a 6f 6f | 6d 50 72 6f 63 50 74 72 |lWindZoo|mProcPtr|
|00001f80| 09 7a 6f 6f 6d 50 72 6f | 63 20 3d 20 28 53 6b 65 |.zoomPro|c = (Ske|
|00001f90| 6c 57 69 6e 64 5a 6f 6f | 6d 50 72 6f 63 50 74 72 |lWindZoo|mProcPtr|
|00001fa0| 29 20 6e 69 6c 3b 0d 0d | 0d 73 74 61 74 69 63 20 |) nil;..|.static |
|00001fb0| 4d 48 48 61 6e 64 6c 65 | 09 6d 68 4c 69 73 74 20 |MHHandle|.mhList |
|00001fc0| 3d 20 28 4d 48 48 61 6e | 64 6c 65 29 20 6e 69 6c |= (MHHan|dle) nil|
|00001fd0| 3b 0d 73 74 61 74 69 63 | 20 42 6f 6f 6c 65 61 6e |;.static| Boolean|
|00001fe0| 09 6d 68 43 6c 6f 62 4f | 6e 52 6d 76 65 20 3d 20 |.mhClobO|nRmve = |
|00001ff0| 74 72 75 65 3b 0d 73 74 | 61 74 69 63 20 42 6f 6f |true;.st|atic Boo|
|00002000| 6c 65 61 6e 09 6d 68 44 | 72 61 77 42 61 72 4f 6e |lean.mhD|rawBarOn|
|00002010| 52 6d 76 65 20 3d 20 74 | 72 75 65 3b 0d 0d 0d 2f |Rmve = t|rue;.../|
|00002020| 2a 0d 20 2a 20 4d 69 73 | 63 65 6c 6c 61 6e 65 6f |*. * Mis|cellaneo|
|00002030| 75 73 0d 20 2a 0d 20 2a | 20 2d 20 73 6b 65 6c 45 |us. *. *| - skelE|
|00002040| 6e 76 20 63 6f 6e 74 61 | 69 6e 73 20 53 79 73 45 |nv conta|ins SysE|
|00002050| 6e 76 69 72 6f 6e 73 28 | 29 20 69 6e 66 6f 72 6d |nvirons(|) inform|
|00002060| 61 74 69 6f 6e 2e 0d 20 | 2a 20 2d 20 73 79 73 56 |ation.. |* - sysV|
|00002070| 65 72 73 69 6f 6e 20 63 | 6f 6e 74 61 69 6e 73 20 |ersion c|ontains |
|00002080| 74 68 65 20 73 79 73 74 | 65 6d 20 73 6f 66 74 77 |the syst|em softw|
|00002090| 61 72 65 20 76 65 72 73 | 69 6f 6e 2e 0d 20 2a 20 |are vers|ion.. * |
|000020a0| 2d 20 68 61 73 47 65 73 | 74 61 6c 74 20 69 73 20 |- hasGes|talt is |
|000020b0| 74 72 75 65 20 69 66 20 | 47 65 73 74 61 6c 74 28 |true if |Gestalt(|
|000020c0| 29 20 69 73 20 73 75 70 | 70 6f 72 74 65 64 2e 0d |) is sup|ported..|
|000020d0| 20 2a 20 2d 20 68 61 73 | 36 34 4b 52 4f 4d 20 69 | * - has|64KROM i|
|000020e0| 73 20 74 72 75 65 20 69 | 66 20 74 68 65 20 63 75 |s true i|f the cu|
|000020f0| 72 72 65 6e 74 20 6d 61 | 63 68 69 6e 65 20 68 61 |rrent ma|chine ha|
|00002100| 73 20 74 68 65 20 36 34 | 4b 20 52 4f 4d 2e 0d 20 |s the 64|K ROM.. |
|00002110| 2a 20 2d 20 6d 42 61 72 | 48 65 69 67 68 74 20 69 |* - mBar|Height i|
|00002120| 73 20 6d 65 6e 75 20 62 | 61 72 20 68 65 69 67 68 |s menu b|ar heigh|
|00002130| 74 2e 20 20 57 69 6e 64 | 6f 77 20 73 69 7a 69 6e |t. Wind|ow sizin|
|00002140| 67 2c 20 7a 6f 6f 6d 69 | 6e 67 20 61 6e 64 20 64 |g, zoomi|ng and d|
|00002150| 72 61 67 67 69 6e 67 0d | 20 2a 20 63 6f 64 65 20 |ragging.| * code |
|00002160| 74 61 6b 65 73 20 74 68 | 69 73 20 69 6e 74 6f 20 |takes th|is into |
|00002170| 61 63 63 6f 75 6e 74 2e | 20 20 49 6e 69 74 69 61 |account.| Initia|
|00002180| 6c 69 7a 65 64 20 69 6e | 20 53 6b 65 6c 49 6e 69 |lized in| SkelIni|
|00002190| 74 28 29 2c 20 77 68 69 | 63 68 20 73 65 65 0d 20 |t(), whi|ch see. |
|000021a0| 2a 20 66 6f 72 20 74 65 | 65 74 68 2d 67 6e 61 73 |* for te|eth-gnas|
|000021b0| 68 69 6e 67 20 6f 76 65 | 72 20 73 75 63 68 20 61 |hing ove|r such a|
|000021c0| 20 73 69 6d 70 6c 65 20 | 74 68 69 6e 67 2e 0d 20 | simple |thing.. |
|000021d0| 2a 20 2d 20 64 6f 6e 65 | 46 6c 61 67 20 64 65 74 |* - done|Flag det|
|000021e0| 65 72 6d 69 6e 65 73 20 | 77 68 65 6e 20 53 6b 65 |ermines |when Ske|
|000021f0| 6c 45 76 65 6e 74 4c 6f | 6f 70 28 29 20 72 65 74 |lEventLo|op() ret|
|00002200| 75 72 6e 73 2e 20 20 49 | 74 20 69 73 20 73 65 74 |urns. I|t is set|
|00002210| 20 62 79 20 63 61 6c 6c | 69 6e 67 0d 20 2a 20 53 | by call|ing. * S|
|00002220| 6b 65 6c 53 74 6f 70 45 | 76 65 6e 74 4c 6f 6f 70 |kelStopE|ventLoop|
|00002230| 28 29 2c 20 77 68 69 63 | 68 20 69 73 20 68 6f 77 |(), whic|h is how|
|00002240| 20 74 68 65 20 68 6f 73 | 74 20 72 65 71 75 65 73 | the hos|t reques|
|00002250| 74 73 20 61 20 68 61 6c | 74 2e 0d 20 2a 20 2d 20 |ts a hal|t.. * - |
|00002260| 70 49 64 6c 65 20 70 6f | 69 6e 74 73 20 74 6f 20 |pIdle po|ints to |
|00002270| 61 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 70 72 6f |a backgr|ound pro|
|00002280| 63 65 64 75 72 65 2c 20 | 74 6f 20 62 65 20 72 75 |cedure, |to be ru|
|00002290| 6e 20 64 75 72 69 6e 67 | 20 65 76 65 6e 74 0d 20 |n during| event. |
|000022a0| 2a 20 70 72 6f 63 65 73 | 73 69 6e 67 2e 20 20 53 |* proces|sing. S|
|000022b0| 65 74 20 69 74 20 77 69 | 74 68 20 53 6b 65 6c 53 |et it wi|th SkelS|
|000022c0| 65 74 49 64 6c 65 28 29 | 2e 20 20 49 66 20 6e 69 |etIdle()|. If ni|
|000022d0| 6c 2c 20 74 68 65 72 65 | 27 73 20 6e 6f 0d 20 2a |l, there|'s no. *|
|000022e0| 20 70 72 6f 63 65 64 75 | 72 65 2e 0d 20 2a 20 2d | procedu|re.. * -|
|000022f0| 20 70 45 76 65 6e 74 20 | 70 6f 69 6e 74 73 20 74 | pEvent |points t|
|00002300| 6f 20 61 6e 20 65 76 65 | 6e 74 2d 69 6e 73 70 65 |o an eve|nt-inspe|
|00002310| 63 74 69 6e 67 20 68 6f | 6f 6b 2c 20 74 6f 20 62 |cting ho|ok, to b|
|00002320| 65 20 72 75 6e 20 77 68 | 65 6e 65 76 65 72 20 61 |e run wh|enever a|
|00002330| 6e 0d 20 2a 20 65 76 65 | 6e 74 20 6f 63 63 75 72 |n. * eve|nt occur|
|00002340| 73 2e 20 20 53 65 74 20 | 69 74 20 77 69 74 68 20 |s. Set |it with |
|00002350| 53 6b 65 6c 53 65 74 45 | 76 65 6e 74 48 6f 6f 6b |SkelSetE|ventHook|
|00002360| 28 29 2e 20 20 49 66 20 | 6e 69 6c 2c 20 74 68 65 |(). If |nil, the|
|00002370| 72 65 27 73 20 6e 6f 0d | 20 2a 20 70 72 6f 63 65 |re's no.| * proce|
|00002380| 64 75 72 65 2e 0d 20 2a | 20 2d 20 65 76 65 6e 74 |dure.. *| - event|
|00002390| 4d 61 73 6b 20 63 6f 6e | 74 72 6f 6c 73 20 74 68 |Mask con|trols th|
|000023a0| 65 20 65 76 65 6e 74 20 | 74 79 70 65 73 20 72 65 |e event |types re|
|000023b0| 71 75 65 73 74 65 64 20 | 62 79 20 47 65 74 4e 65 |quested |by GetNe|
|000023c0| 78 74 45 76 65 6e 74 28 | 29 20 6f 72 0d 20 2a 20 |xtEvent(|) or. * |
|000023d0| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 28 29 20 |WaitNext|Event() |
|000023e0| 69 6e 20 53 6b 65 6c 45 | 76 65 6e 74 4c 6f 6f 70 |in SkelE|ventLoop|
|000023f0| 28 29 2e 0d 20 2a 20 2d | 20 70 4d 65 6e 75 48 6f |().. * -| pMenuHo|
|00002400| 6f 6b 20 70 6f 69 6e 74 | 73 20 74 6f 20 61 20 70 |ok point|s to a p|
|00002410| 72 6f 63 65 64 75 72 65 | 20 63 61 6c 6c 65 64 20 |rocedure| called |
|00002420| 77 68 65 6e 65 76 65 72 | 20 61 20 6d 65 6e 75 20 |whenever| a menu |
|00002430| 73 65 6c 65 63 74 69 6f | 6e 20 69 73 20 61 62 6f |selectio|n is abo|
|00002440| 75 74 0d 20 2a 20 74 6f | 20 62 65 20 65 78 65 63 |ut. * to| be exec|
|00002450| 75 74 65 64 2e 20 20 6e | 69 6c 20 69 66 20 6e 6f |uted. n|il if no|
|00002460| 20 68 6f 6f 6b 2e 0d 20 | 2a 20 2d 20 64 69 73 6b | hook.. |* - disk|
|00002470| 49 6e 69 74 50 74 20 69 | 73 20 74 68 65 20 6c 6f |InitPt i|s the lo|
|00002480| 63 61 74 69 6f 6e 20 61 | 74 20 77 68 69 63 68 20 |cation a|t which |
|00002490| 74 68 65 20 64 69 73 6b | 20 69 6e 69 74 69 61 6c |the disk| initial|
|000024a0| 69 7a 61 74 69 6f 6e 20 | 64 69 61 6c 6f 67 0d 20 |ization |dialog. |
|000024b0| 2a 20 61 70 70 65 61 72 | 73 2c 20 69 66 20 61 6e |* appear|s, if an|
|000024c0| 20 75 6e 69 6e 69 74 69 | 61 6c 69 7a 65 64 20 64 | uniniti|alized d|
|000024d0| 69 73 6b 20 69 73 20 69 | 6e 73 65 72 74 65 64 2e |isk is i|nserted.|
|000024e0| 0d 20 2a 20 2d 20 65 76 | 65 6e 74 4d 6f 64 69 66 |. * - ev|entModif|
|000024f0| 69 65 72 73 20 69 73 20 | 74 68 65 20 76 61 6c 75 |iers is |the valu|
|00002500| 65 20 6f 66 20 74 68 65 | 20 6d 6f 64 69 66 69 65 |e of the| modifie|
|00002510| 72 73 20 66 69 65 6c 64 | 20 6f 66 20 74 68 65 20 |rs field| of the |
|00002520| 63 75 72 72 65 6e 74 20 | 65 76 65 6e 74 2e 0d 20 |current |event.. |
|00002530| 2a 20 2d 20 65 76 65 6e | 74 50 74 72 20 70 6f 69 |* - even|tPtr poi|
|00002540| 6e 74 73 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |nts to t|he curre|
|00002550| 6e 74 20 65 76 65 6e 74 | 20 28 6e 69 6c 20 69 66 |nt event| (nil if|
|00002560| 20 6e 6f 6e 65 20 73 65 | 65 6e 20 79 65 74 29 2e | none se|en yet).|
|00002570| 0d 20 2a 20 2d 20 64 65 | 66 49 6e 69 74 50 61 72 |. * - de|fInitPar|
|00002580| 61 6d 73 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ams cont|ains the|
|00002590| 20 64 65 66 61 75 6c 74 | 20 53 6b 65 6c 49 6e 69 | default| SkelIni|
|000025a0| 74 28 29 20 70 61 72 61 | 6d 65 74 65 72 73 20 69 |t() para|meters i|
|000025b0| 66 20 63 61 6c 6c 65 72 | 20 70 61 73 73 65 73 0d |f caller| passes.|
|000025c0| 20 2a 20 6e 69 6c 2e 0d | 20 2a 2f 0d 0d 73 74 61 | * nil..| */..sta|
|000025d0| 74 69 63 20 53 79 73 45 | 6e 76 52 65 63 09 73 6b |tic SysE|nvRec.sk|
|000025e0| 65 6c 45 6e 76 3b 0d 73 | 74 61 74 69 63 20 6c 6f |elEnv;.s|tatic lo|
|000025f0| 6e 67 09 73 79 73 56 65 | 72 73 69 6f 6e 20 3d 20 |ng.sysVe|rsion = |
|00002600| 30 3b 0d 73 74 61 74 69 | 63 20 42 6f 6f 6c 65 61 |0;.stati|c Boolea|
|00002610| 6e 09 68 61 73 47 65 73 | 74 61 6c 74 3b 0d 73 74 |n.hasGes|talt;.st|
|00002620| 61 74 69 63 20 42 6f 6f | 6c 65 61 6e 09 68 61 73 |atic Boo|lean.has|
|00002630| 36 34 4b 52 4f 4d 3b 0d | 73 74 61 74 69 63 20 73 |64KROM;.|static s|
|00002640| 68 6f 72 74 09 6d 42 61 | 72 48 65 69 67 68 74 3b |hort.mBa|rHeight;|
|00002650| 0d 73 74 61 74 69 63 20 | 73 68 6f 72 74 09 64 6f |.static |short.do|
|00002660| 6e 65 46 6c 61 67 3b 0d | 73 74 61 74 69 63 20 73 |neFlag;.|static s|
|00002670| 68 6f 72 74 09 65 76 65 | 6e 74 4d 61 73 6b 20 3d |hort.eve|ntMask =|
|00002680| 20 65 76 65 72 79 45 76 | 65 6e 74 20 5e 20 6b 65 | everyEv|ent ^ ke|
|00002690| 79 55 70 4d 61 73 6b 3b | 0d 73 74 61 74 69 63 20 |yUpMask;|.static |
|000026a0| 73 68 6f 72 74 09 65 76 | 65 6e 74 4d 6f 64 69 66 |short.ev|entModif|
|000026b0| 69 65 72 73 20 3d 20 30 | 3b 0d 73 74 61 74 69 63 |iers = 0|;.static|
|000026c0| 20 45 76 65 6e 74 52 65 | 63 6f 72 64 09 2a 65 76 | EventRe|cord.*ev|
|000026d0| 65 6e 74 50 74 72 20 3d | 20 28 45 76 65 6e 74 52 |entPtr =| (EventR|
|000026e0| 65 63 6f 72 64 20 2a 29 | 20 6e 69 6c 3b 0d 73 74 |ecord *)| nil;.st|
|000026f0| 61 74 69 63 20 50 6f 69 | 6e 74 09 64 69 73 6b 49 |atic Poi|nt.diskI|
|00002700| 6e 69 74 50 74 20 3d 20 | 7b 20 2f 2a 20 76 20 3d |nitPt = |{ /* v =|
|00002710| 20 2a 2f 20 31 32 30 2c | 20 2f 2a 20 68 20 3d 20 | */ 120,| /* h = |
|00002720| 2a 2f 20 31 30 30 20 7d | 3b 0d 0d 73 74 61 74 69 |*/ 100 }|;..stati|
|00002730| 63 20 53 6b 65 6c 49 64 | 6c 65 50 72 6f 63 50 74 |c SkelId|leProcPt|
|00002740| 72 09 09 09 70 49 64 6c | 65 20 3d 20 28 53 6b 65 |r...pIdl|e = (Ske|
|00002750| 6c 49 64 6c 65 50 72 6f | 63 50 74 72 29 20 6e 69 |lIdlePro|cPtr) ni|
|00002760| 6c 3b 0d 73 74 61 74 69 | 63 20 53 6b 65 6c 45 76 |l;.stati|c SkelEv|
|00002770| 65 6e 74 48 6f 6f 6b 50 | 72 6f 63 50 74 72 09 09 |entHookP|rocPtr..|
|00002780| 70 45 76 65 6e 74 20 3d | 20 28 53 6b 65 6c 45 76 |pEvent =| (SkelEv|
|00002790| 65 6e 74 48 6f 6f 6b 50 | 72 6f 63 50 74 72 29 20 |entHookP|rocPtr) |
|000027a0| 6e 69 6c 3b 0d 73 74 61 | 74 69 63 20 53 6b 65 6c |nil;.sta|tic Skel|
|000027b0| 4d 65 6e 75 48 6f 6f 6b | 50 72 6f 63 50 74 72 09 |MenuHook|ProcPtr.|
|000027c0| 09 70 4d 65 6e 75 48 6f | 6f 6b 20 3d 20 28 53 6b |.pMenuHo|ok = (Sk|
|000027d0| 65 6c 4d 65 6e 75 48 6f | 6f 6b 50 72 6f 63 50 74 |elMenuHo|okProcPt|
|000027e0| 72 29 20 6e 69 6c 3b 0d | 0d 73 74 61 74 69 63 20 |r) nil;.|.static |
|000027f0| 53 6b 65 6c 49 6e 69 74 | 50 61 72 61 6d 73 09 64 |SkelInit|Params.d|
|00002800| 65 66 49 6e 69 74 50 61 | 72 61 6d 73 20 3d 0d 7b |efInitPa|rams =.{|
|00002810| 0d 09 36 2c 09 09 09 09 | 09 09 2f 2a 20 6e 6f 2e |..6,....|../* no.|
|00002820| 20 6f 66 20 74 69 6d 65 | 73 20 74 6f 20 63 61 6c | of time|s to cal|
|00002830| 6c 20 4d 6f 72 65 4d 61 | 73 74 65 72 73 28 29 20 |l MoreMa|sters() |
|00002840| 2a 2f 0d 09 28 47 72 6f | 77 5a 6f 6e 65 50 72 6f |*/..(Gro|wZonePro|
|00002850| 63 50 74 72 29 20 6e 69 | 6c 2c 09 2f 2a 20 47 72 |cPtr) ni|l,./* Gr|
|00002860| 6f 77 5a 6f 6e 65 20 70 | 72 6f 63 20 2a 2f 0d 09 |owZone p|roc */..|
|00002870| 28 52 65 73 75 6d 65 50 | 72 6f 63 50 74 72 29 20 |(ResumeP|rocPtr) |
|00002880| 6e 69 6c 2c 09 2f 2a 20 | 72 65 73 75 6d 65 20 70 |nil,./* |resume p|
|00002890| 72 6f 63 20 2a 2f 0d 09 | 30 4c 09 09 09 09 09 09 |roc */..|0L......|
|000028a0| 2f 2a 20 73 74 61 63 6b | 20 61 64 6a 75 73 74 6d |/* stack| adjustm|
|000028b0| 65 6e 74 20 2a 2f 0d 7d | 3b 0d 0d 2f 2a 0d 20 2a |ent */.}|;../*. *|
|000028c0| 20 4d 75 6c 74 69 74 61 | 73 6b 69 6e 67 20 73 75 | Multita|sking su|
|000028d0| 70 70 6f 72 74 20 73 74 | 75 66 66 0d 20 2a 0d 20 |pport st|uff. *. |
|000028e0| 2a 20 68 61 73 57 4e 45 | 20 69 73 20 74 72 75 65 |* hasWNE| is true|
|000028f0| 20 69 66 20 57 61 69 74 | 4e 65 78 74 45 76 65 6e | if Wait|NextEven|
|00002900| 74 28 29 20 69 73 20 61 | 76 61 69 6c 61 62 6c 65 |t() is a|vailable|
|00002910| 2e 0d 20 2a 0d 20 2a 20 | 69 6e 46 6f 72 65 67 72 |.. *. * |inForegr|
|00002920| 6f 75 6e 64 20 69 73 20 | 74 72 75 65 20 69 66 20 |ound is |true if |
|00002930| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 69 73 20 72 |applicat|ion is r|
|00002940| 75 6e 6e 69 6e 67 20 69 | 6e 20 66 6f 72 65 67 72 |unning i|n foregr|
|00002950| 6f 75 6e 64 20 28 6e 6f | 74 0d 20 2a 20 73 75 73 |ound (no|t. * sus|
|00002960| 70 65 6e 64 65 64 29 2e | 20 20 49 6e 69 74 69 61 |pended).| Initia|
|00002970| 6c 6c 79 20 74 72 75 65 | 2c 20 70 65 72 20 50 47 |lly true|, per PG|
|00002980| 4d 46 20 33 2d 31 2e 0d | 20 2a 0d 20 2a 20 67 65 |MF 3-1..| *. * ge|
|00002990| 74 46 72 6f 6e 74 43 6c | 69 63 6b 73 20 69 6e 64 |tFrontCl|icks ind|
|000029a0| 69 63 61 74 65 73 20 77 | 68 65 74 68 65 72 20 74 |icates w|hether t|
|000029b0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 77 |he appli|cation w|
|000029c0| 61 6e 74 73 20 74 6f 20 | 72 65 63 65 69 76 65 0d |ants to |receive.|
|000029d0| 20 2a 20 63 6f 6e 74 65 | 6e 74 2d 61 72 65 61 20 | * conte|nt-area |
|000029e0| 63 6c 69 63 6b 73 20 74 | 68 61 74 20 62 72 69 6e |clicks t|hat brin|
|000029f0| 67 20 69 74 20 74 6f 20 | 74 68 65 20 66 6f 72 65 |g it to |the fore|
|00002a00| 67 72 6f 75 6e 64 2e 0d | 20 2a 0d 20 2a 20 66 67 |ground..| *. * fg|
|00002a10| 57 61 69 74 54 69 6d 65 | 20 61 6e 64 20 62 67 57 |WaitTime| and bgW|
|00002a20| 61 69 74 54 69 6d 65 20 | 61 72 65 20 57 61 69 74 |aitTime |are Wait|
|00002a30| 4e 65 78 74 45 76 65 6e | 74 28 29 20 74 69 6d 65 |NextEven|t() time|
|00002a40| 73 20 66 6f 72 20 66 6f | 72 65 67 72 6f 75 6e 64 |s for fo|reground|
|00002a50| 20 61 6e 64 0d 20 2a 20 | 62 61 63 6b 67 72 6f 75 | and. * |backgrou|
|00002a60| 6e 64 20 73 74 61 74 65 | 73 2e 0d 20 2a 2f 0d 0d |nd state|s.. */..|
|00002a70| 73 74 61 74 69 63 20 42 | 6f 6f 6c 65 61 6e 09 68 |static B|oolean.h|
|00002a80| 61 73 57 4e 45 3b 0d 73 | 74 61 74 69 63 20 42 6f |asWNE;.s|tatic Bo|
|00002a90| 6f 6c 65 61 6e 09 69 6e | 46 6f 72 65 67 72 6f 75 |olean.in|Foregrou|
|00002aa0| 6e 64 20 3d 20 74 72 75 | 65 3b 0d 73 74 61 74 69 |nd = tru|e;.stati|
|00002ab0| 63 20 6c 6f 6e 67 09 66 | 67 57 61 69 74 54 69 6d |c long.f|gWaitTim|
|00002ac0| 65 20 3d 20 36 4c 3b 09 | 09 09 2f 2a 20 30 2e 31 |e = 6L;.|../* 0.1|
|00002ad0| 20 73 65 63 6f 6e 64 73 | 20 2a 2f 0d 73 74 61 74 | seconds| */.stat|
|00002ae0| 69 63 20 6c 6f 6e 67 09 | 62 67 57 61 69 74 54 69 |ic long.|bgWaitTi|
|00002af0| 6d 65 20 3d 20 33 30 30 | 4c 3b 09 09 09 2f 2a 20 |me = 300|L;.../* |
|00002b00| 35 2e 30 20 73 65 63 6f | 6e 64 73 20 2a 2f 0d 73 |5.0 seco|nds */.s|
|00002b10| 74 61 74 69 63 20 42 6f | 6f 6c 65 61 6e 09 67 65 |tatic Bo|olean.ge|
|00002b20| 74 46 72 6f 6e 74 43 6c | 69 63 6b 73 20 3d 20 66 |tFrontCl|icks = f|
|00002b30| 61 6c 73 65 3b 0d 73 74 | 61 74 69 63 20 53 6b 65 |alse;.st|atic Ske|
|00002b40| 6c 53 75 73 70 65 6e 64 | 52 65 73 75 6d 65 50 72 |lSuspend|ResumePr|
|00002b50| 6f 63 50 74 72 09 70 53 | 75 73 70 65 6e 64 52 65 |ocPtr.pS|uspendRe|
|00002b60| 73 75 6d 65 20 3d 20 28 | 53 6b 65 6c 53 75 73 70 |sume = (|SkelSusp|
|00002b70| 65 6e 64 52 65 73 75 6d | 65 50 72 6f 63 50 74 72 |endResum|eProcPtr|
|00002b80| 29 20 6e 69 6c 3b 0d 73 | 74 61 74 69 63 20 53 6b |) nil;.s|tatic Sk|
|00002b90| 65 6c 43 6c 69 70 43 76 | 74 50 72 6f 63 50 74 72 |elClipCv|tProcPtr|
|00002ba0| 09 70 43 6c 69 70 43 76 | 74 20 3d 20 28 53 6b 65 |.pClipCv|t = (Ske|
|00002bb0| 6c 43 6c 69 70 43 76 74 | 50 72 6f 63 50 74 72 29 |lClipCvt|ProcPtr)|
|00002bc0| 20 6e 69 6c 3b 0d 0d 73 | 74 61 74 69 63 20 57 69 | nil;..s|tatic Wi|
|00002bd0| 6e 64 6f 77 50 74 72 09 | 6f 6c 64 57 69 6e 64 6f |ndowPtr.|oldWindo|
|00002be0| 77 20 3d 20 28 57 69 6e | 64 6f 77 50 74 72 29 20 |w = (Win|dowPtr) |
|00002bf0| 6e 69 6c 3b 20 09 0d 73 | 74 61 74 69 63 20 57 48 |nil; ..s|tatic WH|
|00002c00| 48 61 6e 64 6c 65 09 09 | 6f 6c 64 57 44 48 61 6e |Handle..|oldWDHan|
|00002c10| 64 6c 65 72 20 3d 20 28 | 57 48 48 61 6e 64 6c 65 |dler = (|WHHandle|
|00002c20| 29 20 6e 69 6c 3b 0d 0d | 2f 2a 0d 20 2a 20 41 70 |) nil;..|/*. * Ap|
|00002c30| 70 6c 65 20 45 76 65 6e | 74 20 73 75 70 70 6f 72 |ple Even|t suppor|
|00002c40| 74 0d 20 2a 2f 0d 0d 73 | 74 61 74 69 63 20 42 6f |t. */..s|tatic Bo|
|00002c50| 6f 6c 65 61 6e 09 68 61 | 73 41 70 70 6c 65 45 76 |olean.ha|sAppleEv|
|00002c60| 65 6e 74 73 20 3d 20 30 | 3b 0d 73 74 61 74 69 63 |ents = 0|;.static|
|00002c70| 20 53 6b 65 6c 41 45 48 | 61 6e 64 6c 65 72 50 72 | SkelAEH|andlerPr|
|00002c80| 6f 63 50 74 72 09 70 41 | 45 48 61 6e 64 6c 65 72 |ocPtr.pA|EHandler|
|00002c90| 20 3d 20 28 53 6b 65 6c | 41 45 48 61 6e 64 6c 65 | = (Skel|AEHandle|
|00002ca0| 72 50 72 6f 63 50 74 72 | 29 20 6e 69 6c 3b 0d 09 |rProcPtr|) nil;..|
|00002cb0| 0d 0d 23 20 69 66 64 65 | 66 09 73 75 70 70 6f 72 |..# ifde|f.suppor|
|00002cc0| 74 44 69 61 6c 6f 67 73 | 0d 0d 2f 2a 0d 20 2a 20 |tDialogs|../*. * |
|00002cd0| 49 73 44 69 61 6c 6f 67 | 45 76 65 6e 74 28 29 20 |IsDialog|Event() |
|00002ce0| 72 65 74 75 72 6e 73 20 | 74 72 75 65 20 66 6f 72 |returns |true for|
|00002cf0| 20 61 6e 79 20 65 76 65 | 6e 74 73 20 77 68 65 6e | any eve|nts when|
|00002d00| 20 61 20 64 69 61 6c 6f | 67 20 69 73 0d 20 2a 20 | a dialo|g is. * |
|00002d10| 66 72 6f 6e 74 6d 6f 73 | 74 2c 20 62 75 74 20 64 |frontmos|t, but d|
|00002d20| 6c 6f 67 45 76 65 6e 74 | 4d 61 73 6b 20 73 70 65 |logEvent|Mask spe|
|00002d30| 63 69 66 69 65 73 20 77 | 68 69 63 68 20 65 76 65 |cifies w|hich eve|
|00002d40| 6e 74 73 20 77 69 6c 6c | 20 61 63 74 75 61 6c 6c |nts will| actuall|
|00002d50| 79 0d 20 2a 20 62 65 20 | 70 61 73 73 65 64 20 74 |y. * be |passed t|
|00002d60| 6f 20 64 69 61 6c 6f 67 | 73 20 62 79 20 54 72 61 |o dialog|s by Tra|
|00002d70| 6e 73 53 6b 65 6c 2e 20 | 4f 74 68 65 72 73 20 61 |nsSkel. |Others a|
|00002d80| 72 65 20 69 67 6e 6f 72 | 65 64 2e 20 20 53 74 61 |re ignor|ed. Sta|
|00002d90| 6e 64 61 72 64 0d 20 2a | 20 6d 61 73 6b 20 62 65 |ndard. *| mask be|
|00002da0| 6c 6f 77 20 70 61 73 73 | 65 73 2c 20 6d 6f 75 73 |low pass|es, mous|
|00002db0| 65 64 6f 77 6e 2c 20 6b | 65 79 64 6f 77 6e 2c 20 |edown, k|eydown, |
|00002dc0| 61 75 74 6f 6b 65 79 2c | 20 6b 65 79 75 70 2c 20 |autokey,| keyup, |
|00002dd0| 75 70 64 61 74 65 2c 0d | 20 2a 20 61 63 74 69 76 |update,.| * activ|
|00002de0| 61 74 65 2c 20 61 6e 64 | 20 6e 75 6c 6c 20 65 76 |ate, and| null ev|
|00002df0| 65 6e 74 73 2e 20 20 4e | 75 6c 6c 20 65 76 65 6e |ents. N|ull even|
|00002e00| 74 73 20 61 72 65 20 63 | 6f 6e 74 72 6f 6c 6c 65 |ts are c|ontrolle|
|00002e10| 64 0d 20 2a 20 62 79 20 | 62 69 74 20 30 20 28 61 |d. * by |bit 0 (a|
|00002e20| 6c 77 61 79 73 20 66 6f | 72 63 65 64 20 6f 6e 29 |lways fo|rced on)|
|00002e30| 2e 0d 20 2a 2f 0d 0d 73 | 74 61 74 69 63 20 73 68 |.. */..s|tatic sh|
|00002e40| 6f 72 74 09 64 6c 6f 67 | 45 76 65 6e 74 4d 61 73 |ort.dlog|EventMas|
|00002e50| 6b 20 3d 0d 09 09 09 61 | 63 74 69 76 4d 61 73 6b |k =....a|ctivMask|
|00002e60| 20 7c 0d 09 09 09 75 70 | 64 61 74 65 4d 61 73 6b | |....up|dateMask|
|00002e70| 20 7c 0d 09 09 09 61 75 | 74 6f 4b 65 79 4d 61 73 | |....au|toKeyMas|
|00002e80| 6b 20 7c 0d 09 09 09 6b | 65 79 44 6f 77 6e 4d 61 |k |....k|eyDownMa|
|00002e90| 73 6b 20 7c 0d 09 09 09 | 6d 44 6f 77 6e 4d 61 73 |sk |....|mDownMas|
|00002ea0| 6b 20 7c 0d 09 09 09 31 | 3b 0d 23 20 65 6e 64 69 |k |....1|;.# endi|
|00002eb0| 66 0d 0d 0d 2f 2a 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |f.../* -|--------|
|00002ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002ed0| 2d 2d 20 2a 2f 0d 2f 2a | 20 49 6e 69 74 69 61 6c |-- */./*| Initial|
|00002ee0| 69 7a 61 74 69 6f 6e 20 | 61 6e 64 20 73 68 75 74 |ization |and shut|
|00002ef0| 64 6f 77 6e 20 2a 2f 0d | 2f 2a 20 2d 2d 2d 2d 2d |down */.|/* -----|
|00002f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f10| 2d 2d 2d 2d 2d 2d 20 2a | 2f 0d 0d 2f 2a 0d 20 2a |------ *|/../*. *|
|00002f20| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 74 68 65 20 | Initial|ize the |
|00002f30| 76 61 72 69 6f 75 73 20 | 4d 61 63 69 6e 74 6f 73 |various |Macintos|
|00002f40| 68 20 4d 61 6e 61 67 65 | 72 73 20 61 6e 64 20 6c |h Manage|rs and l|
|00002f50| 6f 74 73 20 6f 66 20 6f | 74 68 65 72 20 73 74 75 |ots of o|ther stu|
|00002f60| 66 66 2e 0d 20 2a 0d 20 | 2a 20 46 6c 75 73 68 45 |ff.. *. |* FlushE|
|00002f70| 76 65 6e 74 73 20 64 6f | 65 73 20 4e 4f 54 20 74 |vents do|es NOT t|
|00002f80| 6f 73 73 20 64 69 73 6b | 20 69 6e 73 65 72 74 20 |oss disk| insert |
|00002f90| 65 76 65 6e 74 73 3b 20 | 74 68 69 73 20 69 73 20 |events; |this is |
|00002fa0| 73 6f 20 64 69 73 6b 73 | 0d 20 2a 20 69 6e 73 65 |so disks|. * inse|
|00002fb0| 72 74 65 64 20 77 68 69 | 6c 65 20 74 68 65 20 61 |rted whi|le the a|
|00002fc0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 69 73 20 73 74 |pplicati|on is st|
|00002fd0| 61 72 74 69 6e 67 20 75 | 70 20 64 6f 6e 27 74 20 |arting u|p don't |
|00002fe0| 72 65 73 75 6c 74 0d 20 | 2a 20 69 6e 20 64 65 61 |result. |* in dea|
|00002ff0| 64 20 64 72 69 76 65 73 | 2e 0d 20 2a 0d 20 2a 20 |d drives|.. *. * |
|00003000| 69 6e 69 74 50 61 72 61 | 6d 73 20 63 6f 6e 74 61 |initPara|ms conta|
|00003010| 69 6e 73 20 69 6e 69 74 | 69 61 6c 69 7a 61 74 69 |ins init|ializati|
|00003020| 6f 6e 20 70 61 72 61 6d | 65 74 65 72 73 3a 0d 20 |on param|eters:. |
|00003030| 2a 20 2d 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |* - the |number o|
|00003040| 66 20 74 69 6d 65 73 20 | 74 6f 20 63 61 6c 6c 20 |f times |to call |
|00003050| 4d 6f 72 65 4d 61 73 74 | 65 72 73 0d 20 2a 20 2d |MoreMast|ers. * -|
|00003060| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 | the add|ress of |
|00003070| 61 20 67 72 6f 77 20 7a | 6f 6e 65 20 70 72 6f 63 |a grow z|one proc|
|00003080| 65 64 75 72 65 20 74 6f | 20 63 61 6c 6c 20 69 66 |edure to| call if|
|00003090| 20 6d 65 6d 6f 72 79 20 | 61 6c 6c 6f 63 61 74 69 | memory |allocati|
|000030a0| 6f 6e 0d 20 2a 20 70 72 | 6f 62 6c 65 6d 73 20 6f |on. * pr|oblems o|
|000030b0| 63 63 75 72 20 28 6e 69 | 6c 20 69 66 20 6e 6f 6e |ccur (ni|l if non|
|000030c0| 65 20 74 6f 20 62 65 20 | 75 73 65 64 29 0d 20 2a |e to be |used). *|
|000030d0| 20 2d 20 74 68 65 20 61 | 64 64 72 65 73 73 20 6f | - the a|ddress o|
|000030e0| 66 20 61 20 72 65 73 75 | 6d 65 20 70 72 6f 63 65 |f a resu|me proce|
|000030f0| 64 75 72 65 20 74 6f 20 | 70 61 73 73 20 74 6f 20 |dure to |pass to |
|00003100| 49 6e 69 74 44 69 61 6c | 6f 67 73 28 29 0d 20 2a |InitDial|ogs(). *|
|00003110| 20 28 6e 69 6c 20 69 66 | 20 6e 6f 6e 65 20 69 73 | (nil if| none is|
|00003120| 20 74 6f 20 62 65 20 75 | 73 65 64 29 0d 20 2a 20 | to be u|sed). * |
|00003130| 2d 20 61 6d 6f 75 6e 74 | 20 74 6f 20 61 64 6a 75 |- amount| to adju|
|00003140| 73 74 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |st the a|pplicati|
|00003150| 6f 6e 20 73 74 61 63 6b | 20 73 69 7a 65 20 62 79 |on stack| size by|
|00003160| 20 28 64 65 66 61 75 6c | 74 20 30 3b 20 6e 6f 20 | (defaul|t 0; no |
|00003170| 61 64 6a 75 73 74 6d 65 | 6e 74 29 0d 20 2a 0d 20 |adjustme|nt). *. |
|00003180| 2a 20 69 66 20 69 6e 69 | 74 50 61 72 61 6d 73 20 |* if ini|tParams |
|00003190| 69 73 20 6e 69 6c 2c 20 | 64 65 66 61 75 6c 74 73 |is nil, |defaults|
|000031a0| 20 61 72 65 20 75 73 65 | 64 2e 0d 20 2a 2f 0d 0d | are use|d.. */..|
|000031b0| 70 61 73 63 61 6c 20 76 | 6f 69 64 0d 53 6b 65 6c |pascal v|oid.Skel|
|000031c0| 49 6e 69 74 20 28 53 6b | 65 6c 49 6e 69 74 50 61 |Init (Sk|elInitPa|
|000031d0| 72 61 6d 73 50 74 72 20 | 69 6e 69 74 50 61 72 61 |ramsPtr |initPara|
|000031e0| 6d 73 29 0d 7b 0d 45 76 | 65 6e 74 52 65 63 6f 72 |ms).{.Ev|entRecor|
|000031f0| 64 09 64 75 6d 6d 79 45 | 76 65 6e 74 3b 0d 48 61 |d.dummyE|vent;.Ha|
|00003200| 6e 64 6c 65 09 09 68 3b | 0d 6c 6f 6e 67 09 09 72 |ndle..h;|.long..r|
|00003210| 65 73 75 6c 74 3b 0d 73 | 68 6f 72 74 09 09 69 3b |esult;.s|hort..i;|
|00003220| 0d 0d 09 69 66 20 28 69 | 6e 69 74 50 61 72 61 6d |...if (i|nitParam|
|00003230| 73 20 3d 3d 20 28 53 6b | 65 6c 49 6e 69 74 50 61 |s == (Sk|elInitPa|
|00003240| 72 61 6d 73 20 2a 29 20 | 6e 69 6c 29 0d 09 09 69 |rams *) |nil)...i|
|00003250| 6e 69 74 50 61 72 61 6d | 73 20 3d 20 26 64 65 66 |nitParam|s = &def|
|00003260| 49 6e 69 74 50 61 72 61 | 6d 73 3b 0d 0d 09 69 66 |InitPara|ms;...if|
|00003270| 20 28 69 6e 69 74 50 61 | 72 61 6d 73 2d 3e 73 6b | (initPa|rams->sk|
|00003280| 65 6c 47 7a 50 72 6f 63 | 20 21 3d 20 28 47 72 6f |elGzProc| != (Gro|
|00003290| 77 5a 6f 6e 65 50 72 6f | 63 50 74 72 29 20 6e 69 |wZonePro|cPtr) ni|
|000032a0| 6c 29 0d 09 09 53 65 74 | 47 72 6f 77 5a 6f 6e 65 |l)...Set|GrowZone|
|000032b0| 20 28 69 6e 69 74 50 61 | 72 61 6d 73 2d 3e 73 6b | (initPa|rams->sk|
|000032c0| 65 6c 47 7a 50 72 6f 63 | 29 3b 0d 0d 09 53 65 74 |elGzProc|);...Set|
|000032d0| 41 70 70 6c 4c 69 6d 69 | 74 20 28 47 65 74 41 70 |ApplLimi|t (GetAp|
|000032e0| 70 6c 4c 69 6d 69 74 20 | 28 29 20 2d 20 69 6e 69 |plLimit |() - ini|
|000032f0| 74 50 61 72 61 6d 73 2d | 3e 73 6b 65 6c 53 74 61 |tParams-|>skelSta|
|00003300| 63 6b 41 64 6a 75 73 74 | 29 3b 0d 0d 09 4d 61 78 |ckAdjust|);...Max|
|00003310| 41 70 70 6c 5a 6f 6e 65 | 20 28 29 3b 0d 0d 09 66 |ApplZone| ();...f|
|00003320| 6f 72 20 28 69 20 3d 20 | 30 3b 20 69 20 3c 20 69 |or (i = |0; i < i|
|00003330| 6e 69 74 50 61 72 61 6d | 73 2d 3e 73 6b 65 6c 4d |nitParam|s->skelM|
|00003340| 6f 72 65 4d 61 73 74 65 | 72 73 3b 20 69 2b 2b 29 |oreMaste|rs; i++)|
|00003350| 0d 09 09 4d 6f 72 65 4d | 61 73 74 65 72 73 20 28 |...MoreM|asters (|
|00003360| 29 3b 0d 0d 09 46 6c 75 | 73 68 45 76 65 6e 74 73 |);...Flu|shEvents|
|00003370| 20 28 65 76 65 72 79 45 | 76 65 6e 74 20 2d 20 64 | (everyE|vent - d|
|00003380| 69 73 6b 4d 61 73 6b 2c | 20 30 20 29 3b 0d 09 49 |iskMask,| 0 );..I|
|00003390| 6e 69 74 47 72 61 66 20 | 28 26 74 68 65 50 6f 72 |nitGraf |(&thePor|
|000033a0| 74 29 3b 0d 09 49 6e 69 | 74 46 6f 6e 74 73 20 28 |t);..Ini|tFonts (|
|000033b0| 29 3b 0d 09 49 6e 69 74 | 57 69 6e 64 6f 77 73 20 |);..Init|Windows |
|000033c0| 28 29 3b 0d 09 49 6e 69 | 74 4d 65 6e 75 73 20 28 |();..Ini|tMenus (|
|000033d0| 29 3b 0d 09 54 45 49 6e | 69 74 20 28 29 3b 0d 09 |);..TEIn|it ();..|
|000033e0| 49 6e 69 74 44 69 61 6c | 6f 67 73 20 28 69 6e 69 |InitDial|ogs (ini|
|000033f0| 74 50 61 72 61 6d 73 2d | 3e 73 6b 65 6c 52 65 73 |tParams-|>skelRes|
|00003400| 75 6d 65 50 72 6f 63 29 | 3b 0d 09 49 6e 69 74 43 |umeProc)|;..InitC|
|00003410| 75 72 73 6f 72 20 28 29 | 3b 0d 0d 09 28 76 6f 69 |ursor ()|;...(voi|
|00003420| 64 29 20 53 79 73 45 6e | 76 69 72 6f 6e 73 20 28 |d) SysEn|virons (|
|00003430| 31 2c 20 26 73 6b 65 6c | 45 6e 76 29 3b 0d 09 0d |1, &skel|Env);...|
|00003440| 09 73 79 73 56 65 72 73 | 69 6f 6e 20 3d 20 28 6c |.sysVers|ion = (l|
|00003450| 6f 6e 67 29 20 73 6b 65 | 6c 45 6e 76 2e 73 79 73 |ong) ske|lEnv.sys|
|00003460| 74 65 6d 56 65 72 73 69 | 6f 6e 3b 0d 0d 09 68 61 |temVersi|on;...ha|
|00003470| 73 36 34 4b 52 4f 4d 20 | 3d 20 28 73 6b 65 6c 45 |s64KROM |= (skelE|
|00003480| 6e 76 2e 6d 61 63 68 69 | 6e 65 54 79 70 65 20 3d |nv.machi|neType =|
|00003490| 3d 20 65 6e 76 4d 61 63 | 20 7c 7c 20 73 6b 65 6c |= envMac| || skel|
|000034a0| 45 6e 76 2e 6d 61 63 68 | 69 6e 65 54 79 70 65 20 |Env.mach|ineType |
|000034b0| 3d 3d 20 65 6e 76 58 4c | 29 3b 0d 0d 09 2f 2a 0d |== envXL|);.../*.|
|000034c0| 09 20 2a 20 49 66 20 36 | 34 4b 20 52 4f 4d 20 6d |. * If 6|4K ROM m|
|000034d0| 61 63 68 69 6e 65 2c 20 | 75 73 65 20 68 61 72 64 |achine, |use hard|
|000034e0| 2d 63 6f 64 65 64 20 76 | 61 6c 75 65 20 6f 66 20 |-coded v|alue of |
|000034f0| 32 30 2e 20 20 4f 74 68 | 65 72 77 69 73 65 20 75 |20. Oth|erwise u|
|00003500| 73 65 0d 09 20 2a 20 53 | 63 72 69 70 74 20 4d 61 |se.. * S|cript Ma|
|00003510| 6e 61 67 65 72 20 72 6f | 75 74 69 6e 65 20 47 65 |nager ro|utine Ge|
|00003520| 74 4d 42 61 72 48 65 69 | 67 68 74 28 29 2e 20 20 |tMBarHei|ght(). |
|00003530| 28 54 68 69 73 20 61 73 | 73 75 6d 65 73 2c 20 6a |(This as|sumes, j|
|00003540| 75 73 74 20 74 6f 20 62 | 65 0d 09 20 2a 20 73 61 |ust to b|e.. * sa|
|00003550| 66 65 2c 20 74 68 61 74 | 20 47 65 74 4d 42 61 72 |fe, that| GetMBar|
|00003560| 48 65 69 67 68 74 28 29 | 20 67 6c 75 65 20 64 6f |Height()| glue do|
|00003570| 65 73 6e 27 74 20 72 65 | 74 75 72 6e 20 32 30 20 |esn't re|turn 20 |
|00003580| 6f 6e 20 36 34 4b 20 52 | 4f 4d 20 73 79 73 74 65 |on 64K R|OM syste|
|00003590| 6d 73 2c 0d 09 20 2a 20 | 77 68 69 63 68 20 69 74 |ms,.. * |which it|
|000035a0| 20 76 65 72 79 20 77 65 | 6c 6c 20 6d 61 79 2e 20 | very we|ll may. |
|000035b0| 20 54 68 65 20 6c 6f 77 | 20 6d 65 6d 6f 72 79 20 | The low| memory |
|000035c0| 76 61 72 69 61 62 6c 65 | 20 4d 42 61 72 48 65 69 |variable| MBarHei|
|000035d0| 67 68 74 20 28 30 78 30 | 42 41 41 29 0d 09 20 2a |ght (0x0|BAA).. *|
|000035e0| 20 69 73 6e 27 74 20 75 | 73 65 64 20 62 65 63 61 | isn't u|sed beca|
|000035f0| 75 73 65 20 69 74 20 64 | 6f 65 73 6e 27 74 20 65 |use it d|oesn't e|
|00003600| 78 69 73 74 20 6f 6e 20 | 36 34 4b 20 52 4f 4d 20 |xist on |64K ROM |
|00003610| 6d 61 63 68 69 6e 65 73 | 20 28 54 4e 20 4f 56 20 |machines| (TN OV |
|00003620| 34 2c 20 70 2e 37 29 2e | 0d 09 20 2a 2f 0d 0d 09 |4, p.7).|.. */...|
|00003630| 6d 42 61 72 48 65 69 67 | 68 74 20 3d 20 28 68 61 |mBarHeig|ht = (ha|
|00003640| 73 36 34 4b 52 4f 4d 20 | 3f 20 32 30 20 3a 20 47 |s64KROM |? 20 : G|
|00003650| 65 74 4d 42 61 72 48 65 | 69 67 68 74 20 28 29 29 |etMBarHe|ight ())|
|00003660| 3b 0d 0d 09 2f 2a 0d 09 | 20 2a 20 44 65 74 65 72 |;.../*..| * Deter|
|00003670| 6d 69 6e 65 20 77 68 65 | 74 68 65 72 20 57 61 69 |mine whe|ther Wai|
|00003680| 74 4e 65 78 74 45 76 65 | 6e 74 28 29 20 69 73 20 |tNextEve|nt() is |
|00003690| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 28 54 4e 27 |implemen|ted (TN'|
|000036a0| 73 20 4f 56 20 31 36 20 | 61 6e 64 20 54 42 20 31 |s OV 16 |and TB 1|
|000036b0| 34 2c 0d 09 20 2a 20 54 | 4e 20 31 35 38 0d 09 20 |4,.. * T|N 158.. |
|000036c0| 2a 2f 0d 0d 09 69 66 20 | 28 68 61 73 36 34 4b 52 |*/...if |(has64KR|
|000036d0| 4f 4d 29 0d 09 09 68 61 | 73 57 4e 45 20 3d 20 66 |OM)...ha|sWNE = f|
|000036e0| 61 6c 73 65 3b 0d 09 65 | 6c 73 65 0d 09 09 68 61 |alse;..e|lse...ha|
|000036f0| 73 57 4e 45 20 3d 20 53 | 6b 65 6c 54 72 61 70 41 |sWNE = S|kelTrapA|
|00003700| 76 61 69 6c 61 62 6c 65 | 20 28 5f 57 61 69 74 4e |vailable| (_WaitN|
|00003710| 65 78 74 45 76 65 6e 74 | 29 3b 0d 0d 09 68 61 73 |extEvent|);...has|
|00003720| 47 65 73 74 61 6c 74 20 | 3d 20 53 6b 65 6c 54 72 |Gestalt |= SkelTr|
|00003730| 61 70 41 76 61 69 6c 61 | 62 6c 65 20 28 5f 47 65 |apAvaila|ble (_Ge|
|00003740| 73 74 61 6c 74 29 3b 0d | 09 68 61 73 41 70 70 6c |stalt);.|.hasAppl|
|00003750| 65 45 76 65 6e 74 73 20 | 3d 20 68 61 73 47 65 73 |eEvents |= hasGes|
|00003760| 74 61 6c 74 0d 09 09 09 | 09 09 26 26 20 47 65 73 |talt....|..&& Ges|
|00003770| 74 61 6c 74 20 28 67 65 | 73 74 61 6c 74 41 70 70 |talt (ge|staltApp|
|00003780| 6c 65 45 76 65 6e 74 73 | 41 74 74 72 2c 20 26 72 |leEvents|Attr, &r|
|00003790| 65 73 75 6c 74 29 20 3d | 3d 20 6e 6f 45 72 72 0d |esult) =|= noErr.|
|000037a0| 09 09 09 09 09 26 26 20 | 28 72 65 73 75 6c 74 20 |.....&& |(result |
|000037b0| 26 20 28 31 20 3c 3c 20 | 67 65 73 74 61 6c 74 41 |& (1 << |gestaltA|
|000037c0| 70 70 6c 65 45 76 65 6e | 74 73 50 72 65 73 65 6e |ppleEven|tsPresen|
|000037d0| 74 29 29 3b 0d 0d 09 2f | 2a 0d 09 20 2a 20 43 68 |t));.../|*.. * Ch|
|000037e0| 65 63 6b 20 77 68 65 74 | 68 65 72 20 61 70 70 6c |eck whet|her appl|
|000037f0| 69 63 61 74 69 6f 6e 20 | 77 61 6e 74 73 20 74 6f |ication |wants to|
|00003800| 20 67 65 74 20 22 62 72 | 69 6e 67 20 74 6f 20 66 | get "br|ing to f|
|00003810| 72 6f 6e 74 22 20 63 6c | 69 63 6b 73 2e 0d 09 20 |ront" cl|icks... |
|00003820| 2a 2f 0d 0d 09 69 66 20 | 28 28 68 20 3d 20 47 65 |*/...if |((h = Ge|
|00003830| 74 52 65 73 6f 75 72 63 | 65 20 28 27 53 49 5a 45 |tResourc|e ('SIZE|
|00003840| 27 2c 20 2d 31 29 29 20 | 21 3d 20 28 48 61 6e 64 |', -1)) |!= (Hand|
|00003850| 6c 65 29 20 6e 69 6c 29 | 0d 09 7b 0d 09 09 67 65 |le) nil)|..{...ge|
|00003860| 74 46 72 6f 6e 74 43 6c | 69 63 6b 73 20 3d 20 28 |tFrontCl|icks = (|
|00003870| 28 28 2a 2a 28 73 68 6f | 72 74 20 2a 2a 29 20 68 |((**(sho|rt **) h|
|00003880| 29 20 26 20 30 78 32 30 | 30 29 20 21 3d 20 30 29 |) & 0x20|0) != 0)|
|00003890| 3b 0d 09 09 52 65 6c 65 | 61 73 65 52 65 73 6f 75 |;...Rele|aseResou|
|000038a0| 72 63 65 20 28 68 29 3b | 0d 09 7d 0d 0d 09 2f 2a |rce (h);|..}.../*|
|000038b0| 0d 09 20 2a 20 57 69 6e | 64 6f 77 20 64 72 61 67 |.. * Win|dow drag|
|000038c0| 67 69 6e 67 20 6c 69 6d | 69 74 73 20 61 72 65 20 |ging lim|its are |
|000038d0| 64 65 74 65 72 6d 69 6e | 65 64 20 66 72 6f 6d 20 |determin|ed from |
|000038e0| 62 6f 75 6e 64 69 6e 67 | 20 62 6f 78 20 6f 66 20 |bounding| box of |
|000038f0| 64 65 73 6b 74 6f 70 2e | 0d 09 20 2a 20 55 70 70 |desktop.|.. * Upp|
|00003900| 65 72 20 6c 69 6d 69 74 | 73 20 6f 66 20 77 69 6e |er limit|s of win|
|00003910| 64 6f 77 20 73 69 7a 69 | 6e 67 20 61 72 65 20 72 |dow sizi|ng are r|
|00003920| 65 6c 61 74 65 64 20 74 | 6f 20 74 68 61 74 2e 20 |elated t|o that. |
|00003930| 20 42 6f 74 68 20 63 61 | 6e 20 69 6e 76 6f 6c 76 | Both ca|n involv|
|00003940| 65 0d 09 20 2a 20 6d 75 | 6c 74 69 70 6c 65 20 6d |e.. * mu|ltiple m|
|00003950| 6f 6e 69 74 6f 72 73 2c | 20 61 6e 64 20 73 68 6f |onitors,| and sho|
|00003960| 75 6c 64 20 61 6c 6c 6f | 77 20 66 6f 72 20 6d 65 |uld allo|w for me|
|00003970| 6e 75 20 62 61 72 2e 20 | 20 64 72 61 67 52 65 63 |nu bar. | dragRec|
|00003980| 74 20 69 73 20 69 6e 73 | 65 74 0d 09 20 2a 20 73 |t is ins|et.. * s|
|00003990| 6f 20 61 73 20 74 6f 20 | 6c 65 61 76 65 20 61 74 |o as to |leave at|
|000039a0| 20 6c 65 61 73 74 20 34 | 20 70 69 78 65 6c 73 20 | least 4| pixels |
|000039b0| 6f 66 20 77 69 6e 64 6f | 77 20 74 69 74 6c 65 20 |of windo|w title |
|000039c0| 62 61 72 20 76 69 73 69 | 62 6c 65 20 69 6e 20 62 |bar visi|ble in b|
|000039d0| 6f 74 68 0d 09 20 2a 20 | 64 69 72 65 63 74 69 6f |oth.. * |directio|
|000039e0| 6e 73 20 28 49 4d 20 49 | 2d 32 38 39 29 2e 0d 09 |ns (IM I|-289)...|
|000039f0| 20 2a 0d 09 20 2a 20 47 | 65 74 47 72 61 79 52 67 | *.. * G|etGrayRg|
|00003a00| 6e 28 29 20 62 6f 75 6e | 64 69 6e 67 20 62 6f 78 |n() boun|ding box|
|00003a10| 20 67 69 76 65 73 20 64 | 65 73 6b 74 6f 70 20 65 | gives d|esktop e|
|00003a20| 78 74 65 6e 74 73 2e 20 | 20 4f 6e 20 36 34 4b 20 |xtents. | On 64K |
|00003a30| 52 4f 4d 0d 09 20 2a 20 | 6d 61 63 68 69 6e 65 73 |ROM.. * |machines|
|00003a40| 2c 20 47 65 74 47 72 61 | 79 52 67 6e 28 29 20 6d |, GetGra|yRgn() m|
|00003a50| 69 67 68 74 20 6e 6f 74 | 20 62 65 20 70 72 65 73 |ight not| be pres|
|00003a60| 65 6e 74 3b 20 63 6f 75 | 6c 64 20 75 73 65 20 47 |ent; cou|ld use G|
|00003a70| 72 61 79 52 67 6e 0d 09 | 20 2a 20 62 6f 75 6e 64 |rayRgn..| * bound|
|00003a80| 69 6e 67 20 62 6f 78 2c | 20 62 75 74 20 75 73 65 |ing box,| but use|
|00003a90| 20 73 63 72 65 65 6e 42 | 69 74 73 2e 62 6f 75 6e | screenB|its.boun|
|00003aa0| 64 73 20 2d 20 6d 65 6e | 75 20 62 61 72 2c 20 74 |ds - men|u bar, t|
|00003ab0| 6f 20 61 76 6f 69 64 0d | 09 20 2a 20 6c 6f 77 20 |o avoid.|. * low |
|00003ac0| 6d 65 6d 6f 72 79 20 61 | 63 63 65 73 73 2e 20 20 |memory a|ccess. |
|00003ad0| 54 68 65 20 74 77 6f 20 | 73 68 6f 75 6c 64 20 62 |The two |should b|
|00003ae0| 65 20 65 71 75 69 76 61 | 6c 65 6e 74 2e 0d 09 20 |e equiva|lent... |
|00003af0| 2a 2f 0d 0d 09 69 66 20 | 28 68 61 73 36 34 4b 52 |*/...if |(has64KR|
|00003b00| 4f 4d 29 0d 09 7b 0d 09 | 09 64 72 61 67 52 65 63 |OM)..{..|.dragRec|
|00003b10| 74 20 3d 20 73 63 72 65 | 65 6e 42 69 74 73 2e 62 |t = scre|enBits.b|
|00003b20| 6f 75 6e 64 73 3b 0d 09 | 09 64 72 61 67 52 65 63 |ounds;..|.dragRec|
|00003b30| 74 2e 74 6f 70 20 2b 3d | 20 6d 42 61 72 48 65 69 |t.top +=| mBarHei|
|00003b40| 67 68 74 3b 0d 09 7d 0d | 09 65 6c 73 65 0d 09 7b |ght;..}.|.else..{|
|00003b50| 0d 09 09 2f 2a 20 47 65 | 74 47 72 61 79 52 67 6e |.../* Ge|tGrayRgn|
|00003b60| 20 28 29 20 61 6c 72 65 | 61 64 79 20 74 61 6b 65 | () alre|ady take|
|00003b70| 73 20 6d 65 6e 75 20 62 | 61 72 20 69 6e 74 6f 20 |s menu b|ar into |
|00003b80| 61 63 63 6f 75 6e 74 20 | 2a 2f 0d 09 09 64 72 61 |account |*/...dra|
|00003b90| 67 52 65 63 74 20 3d 20 | 28 2a 2a 47 65 74 47 72 |gRect = |(**GetGr|
|00003ba0| 61 79 52 67 6e 20 28 29 | 29 2e 72 67 6e 42 42 6f |ayRgn ()|).rgnBBo|
|00003bb0| 78 3b 0d 09 7d 0d 0d 09 | 53 65 74 52 65 63 74 20 |x;..}...|SetRect |
|00003bc0| 28 26 67 72 6f 77 52 65 | 63 74 2c 20 38 30 2c 20 |(&growRe|ct, 80, |
|00003bd0| 38 30 2c 0d 09 09 09 09 | 64 72 61 67 52 65 63 74 |80,.....|dragRect|
|00003be0| 2e 72 69 67 68 74 20 2d | 20 64 72 61 67 52 65 63 |.right -| dragRec|
|00003bf0| 74 2e 6c 65 66 74 2c 0d | 09 09 09 09 64 72 61 67 |t.left,.|....drag|
|00003c00| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 2d 20 64 72 |Rect.bot|tom - dr|
|00003c10| 61 67 52 65 63 74 2e 74 | 6f 70 29 3b 0d 0d 09 49 |agRect.t|op);...I|
|00003c20| 6e 73 65 74 52 65 63 74 | 20 28 26 64 72 61 67 52 |nsetRect| (&dragR|
|00003c30| 65 63 74 2c 20 34 2c 20 | 34 29 3b 0d 0d 09 2f 2a |ect, 4, |4);.../*|
|00003c40| 20 6c 65 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | let app|lication|
|00003c50| 20 63 6f 6d 65 20 74 6f | 20 66 72 6f 6e 74 20 69 | come to| front i|
|00003c60| 6e 20 6d 75 6c 74 69 74 | 61 73 6b 69 6e 67 20 65 |n multit|asking e|
|00003c70| 6e 76 69 72 6f 6e 6d 65 | 6e 74 2c 20 54 4e 20 54 |nvironme|nt, TN T|
|00003c80| 42 20 33 35 2c 20 70 2e | 38 20 2a 2f 0d 0d 09 28 |B 35, p.|8 */...(|
|00003c90| 76 6f 69 64 29 20 45 76 | 65 6e 74 41 76 61 69 6c |void) Ev|entAvail|
|00003ca0| 20 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 64 | (everyE|vent, &d|
|00003cb0| 75 6d 6d 79 45 76 65 6e | 74 29 3b 0d 09 28 76 6f |ummyEven|t);..(vo|
|00003cc0| 69 64 29 20 45 76 65 6e | 74 41 76 61 69 6c 20 28 |id) Even|tAvail (|
|00003cd0| 65 76 65 72 79 45 76 65 | 6e 74 2c 20 26 64 75 6d |everyEve|nt, &dum|
|00003ce0| 6d 79 45 76 65 6e 74 29 | 3b 0d 09 28 76 6f 69 64 |myEvent)|;..(void|
|00003cf0| 29 20 45 76 65 6e 74 41 | 76 61 69 6c 20 28 65 76 |) EventA|vail (ev|
|00003d00| 65 72 79 45 76 65 6e 74 | 2c 20 26 64 75 6d 6d 79 |eryEvent|, &dummy|
|00003d10| 45 76 65 6e 74 29 3b 0d | 09 28 76 6f 69 64 29 20 |Event);.|.(void) |
|00003d20| 45 76 65 6e 74 41 76 61 | 69 6c 20 28 65 76 65 72 |EventAva|il (ever|
|00003d30| 79 45 76 65 6e 74 2c 20 | 26 64 75 6d 6d 79 45 76 |yEvent, |&dummyEv|
|00003d40| 65 6e 74 29 3b 0d 7d 0d | 0d 0d 2f 2a 0d 20 2a 20 |ent);.}.|../*. * |
|00003d50| 43 6f 70 79 20 74 68 65 | 20 64 65 66 61 75 6c 74 |Copy the| default|
|00003d60| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 20 | initial|ization |
|00003d70| 70 61 72 61 6d 65 74 65 | 72 73 20 69 6e 74 6f 20 |paramete|rs into |
|00003d80| 74 68 65 20 73 74 72 75 | 63 74 75 72 65 0d 20 2a |the stru|cture. *|
|00003d90| 20 70 6f 69 6e 74 65 64 | 20 74 6f 20 62 79 20 69 | pointed| to by i|
|00003da0| 6e 69 74 50 61 72 61 6d | 73 2e 0d 20 2a 2f 0d 0d |nitParam|s.. */..|
|00003db0| 70 61 73 63 61 6c 20 76 | 6f 69 64 0d 53 6b 65 6c |pascal v|oid.Skel|
|00003dc0| 47 65 74 49 6e 69 74 50 | 61 72 61 6d 73 20 28 53 |GetInitP|arams (S|
|00003dd0| 6b 65 6c 49 6e 69 74 50 | 61 72 61 6d 73 50 74 72 |kelInitP|aramsPtr|
|00003de0| 20 69 6e 69 74 50 61 72 | 61 6d 73 29 0d 7b 0d 09 | initPar|ams).{..|
|00003df0| 2a 69 6e 69 74 50 61 72 | 61 6d 73 20 3d 20 64 65 |*initPar|ams = de|
|00003e00| 66 49 6e 69 74 50 61 72 | 61 6d 73 3b 0d 7d 0d 0d |fInitPar|ams;.}..|
|00003e10| 0d 2f 2a 0d 20 2a 20 43 | 6c 6f 62 62 65 72 20 61 |./*. * C|lobber a|
|00003e20| 6c 6c 20 74 68 65 20 6d | 65 6e 75 2c 20 77 69 6e |ll the m|enu, win|
|00003e30| 64 6f 77 20 61 6e 64 20 | 64 69 61 6c 6f 67 20 68 |dow and |dialog h|
|00003e40| 61 6e 64 6c 65 72 73 2e | 20 20 54 65 6c 6c 20 53 |andlers.| Tell S|
|00003e50| 6b 65 6c 52 6d 76 65 4d | 65 6e 75 28 29 0d 20 2a |kelRmveM|enu(). *|
|00003e60| 20 6e 6f 74 20 74 6f 20 | 72 65 64 72 61 77 20 6d | not to |redraw m|
|00003e70| 65 6e 75 20 62 61 72 20 | 73 6f 20 69 74 20 64 6f |enu bar |so it do|
|00003e80| 65 73 6e 27 74 20 66 6c | 69 63 6b 65 72 20 61 73 |esn't fl|icker as|
|00003e90| 20 6d 65 6e 75 73 20 61 | 72 65 20 72 65 6d 6f 76 | menus a|re remov|
|00003ea0| 65 64 2c 0d 20 2a 20 74 | 68 65 6e 20 72 65 64 72 |ed,. * t|hen redr|
|00003eb0| 61 77 20 69 74 20 6d 61 | 6e 75 61 6c 6c 79 2e 0d |aw it ma|nually..|
|00003ec0| 20 2a 0d 20 2a 20 42 65 | 66 6f 72 65 20 72 65 6d | *. * Be|fore rem|
|00003ed0| 6f 76 69 6e 67 20 77 69 | 6e 64 6f 77 20 68 61 6e |oving wi|ndow han|
|00003ee0| 64 6c 65 72 73 2c 20 68 | 69 64 65 20 61 6c 6c 20 |dlers, h|ide all |
|00003ef0| 74 68 65 20 77 69 6e 64 | 6f 77 73 2e 20 20 44 6f |the wind|ows. Do|
|00003f00| 20 74 68 69 73 20 66 72 | 6f 6d 0d 20 2a 20 62 61 | this fr|om. * ba|
|00003f10| 63 6b 20 74 6f 20 66 72 | 6f 6e 74 20 28 6d 6f 72 |ck to fr|ont (mor|
|00003f20| 65 20 65 73 74 68 65 74 | 69 63 20 61 6e 64 20 73 |e esthet|ic and s|
|00003f30| 70 65 65 64 69 65 72 29 | 2e 20 20 49 66 20 61 20 |peedier)|. If a |
|00003f40| 77 69 6e 64 6f 77 20 62 | 65 6c 6f 6e 67 73 20 74 |window b|elongs t|
|00003f50| 6f 20 61 20 44 41 2c 0d | 20 2a 20 63 6c 6f 73 65 |o a DA,.| * close|
|00003f60| 20 74 68 65 20 44 41 2e | 20 20 28 46 6f 72 20 65 | the DA.| (For e|
|00003f70| 61 72 6c 79 20 73 79 73 | 74 65 6d 73 20 28 65 2e |arly sys|tems (e.|
|00003f80| 67 2e 2c 20 34 2e 31 29 | 2c 20 69 66 20 79 6f 75 |g., 4.1)|, if you|
|00003f90| 20 6c 65 61 76 65 20 61 | 20 44 41 20 6f 70 65 6e | leave a| DA open|
|00003fa0| 2c 0d 20 2a 20 74 68 65 | 20 73 79 73 74 65 6d 20 |,. * the| system |
|00003fb0| 63 72 61 73 68 65 73 20 | 74 68 65 20 6e 65 78 74 |crashes |the next|
|00003fc0| 20 74 69 6d 65 20 79 6f | 75 20 74 72 79 20 74 6f | time yo|u try to|
|00003fd0| 20 6f 70 65 6e 20 74 68 | 61 74 20 44 41 2e 29 0d | open th|at DA.).|
|00003fe0| 20 2a 2f 0d 0d 70 61 73 | 63 61 6c 20 76 6f 69 64 | */..pas|cal void|
|00003ff0| 0d 53 6b 65 6c 43 6c 65 | 61 6e 75 70 20 28 76 6f |.SkelCle|anup (vo|
|00004000| 69 64 29 0d 7b 0d 42 6f | 6f 6c 65 61 6e 09 6f 6c |id).{.Bo|olean.ol|
|00004010| 64 46 6c 61 67 3b 0d 73 | 68 6f 72 74 09 74 68 65 |dFlag;.s|hort.the|
|00004020| 4b 69 6e 64 3b 0d 57 69 | 6e 64 6f 77 50 65 65 6b |Kind;.Wi|ndowPeek|
|00004030| 09 77 3b 0d 57 69 6e 64 | 6f 77 50 74 72 09 6c 61 |.w;.Wind|owPtr.la|
|00004040| 73 74 56 69 73 3b 0d 0d | 09 66 6f 72 20 28 3b 3b |stVis;..|.for (;;|
|00004050| 29 0d 09 7b 0d 09 09 6c | 61 73 74 56 69 73 20 3d |)..{...l|astVis =|
|00004060| 20 28 57 69 6e 64 6f 77 | 50 74 72 29 20 6e 69 6c | (Window|Ptr) nil|
|00004070| 3b 0d 09 09 66 6f 72 20 | 28 77 20 3d 20 28 57 69 |;...for |(w = (Wi|
|00004080| 6e 64 6f 77 50 65 65 6b | 29 20 46 72 6f 6e 74 57 |ndowPeek|) FrontW|
|00004090| 69 6e 64 6f 77 20 28 29 | 3b 20 77 20 21 3d 20 28 |indow ()|; w != (|
|000040a0| 57 69 6e 64 6f 77 50 65 | 65 6b 29 20 6e 69 6c 3b |WindowPe|ek) nil;|
|000040b0| 20 77 20 3d 20 77 2d 3e | 6e 65 78 74 57 69 6e 64 | w = w->|nextWind|
|000040c0| 6f 77 29 0d 09 09 7b 0d | 09 09 09 69 66 20 28 77 |ow)...{.|...if (w|
|000040d0| 2d 3e 76 69 73 69 62 6c | 65 29 0d 09 09 09 09 6c |->visibl|e).....l|
|000040e0| 61 73 74 56 69 73 20 3d | 20 28 57 69 6e 64 6f 77 |astVis =| (Window|
|000040f0| 50 74 72 29 20 77 3b 0d | 09 09 7d 0d 09 09 69 66 |Ptr) w;.|..}...if|
|00004100| 20 28 6c 61 73 74 56 69 | 73 20 3d 3d 20 28 57 69 | (lastVi|s == (Wi|
|00004110| 6e 64 6f 77 50 74 72 29 | 20 6e 69 6c 29 09 09 2f |ndowPtr)| nil)../|
|00004120| 2a 20 6e 6f 20 6d 6f 72 | 65 20 76 69 73 69 62 6c |* no mor|e visibl|
|00004130| 65 20 77 69 6e 64 6f 77 | 73 20 2a 2f 0d 09 09 09 |e window|s */....|
|00004140| 62 72 65 61 6b 3b 0d 09 | 09 69 66 20 28 6c 61 73 |break;..|.if (las|
|00004150| 74 56 69 73 20 21 3d 20 | 28 57 69 6e 64 6f 77 50 |tVis != |(WindowP|
|00004160| 74 72 29 20 6e 69 6c 29 | 0d 09 09 7b 0d 09 09 09 |tr) nil)|...{....|
|00004170| 74 68 65 4b 69 6e 64 20 | 3d 20 28 28 57 69 6e 64 |theKind |= ((Wind|
|00004180| 6f 77 50 65 65 6b 29 20 | 6c 61 73 74 56 69 73 29 |owPeek) |lastVis)|
|00004190| 2d 3e 77 69 6e 64 6f 77 | 4b 69 6e 64 3b 0d 09 09 |->window|Kind;...|
|000041a0| 09 69 66 20 28 74 68 65 | 4b 69 6e 64 20 3c 20 30 |.if (the|Kind < 0|
|000041b0| 29 09 09 09 09 2f 2a 20 | 44 41 2c 20 63 6c 6f 73 |)..../* |DA, clos|
|000041c0| 65 20 69 74 20 2a 2f 0d | 09 09 09 09 43 6c 6f 73 |e it */.|....Clos|
|000041d0| 65 44 65 73 6b 41 63 63 | 20 28 74 68 65 4b 69 6e |eDeskAcc| (theKin|
|000041e0| 64 29 3b 0d 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |d);....e|lse.....|
|000041f0| 48 69 64 65 57 69 6e 64 | 6f 77 20 28 6c 61 73 74 |HideWind|ow (last|
|00004200| 56 69 73 29 3b 0d 09 09 | 7d 0d 09 7d 0d 0d 09 77 |Vis);...|}..}...w|
|00004210| 68 69 6c 65 20 28 77 68 | 4c 69 73 74 20 21 3d 20 |hile (wh|List != |
|00004220| 28 57 48 48 61 6e 64 6c | 65 29 20 6e 69 6c 29 0d |(WHHandl|e) nil).|
|00004230| 09 09 53 6b 65 6c 52 6d | 76 65 57 69 6e 64 20 28 |..SkelRm|veWind (|
|00004240| 28 2a 2a 77 68 4c 69 73 | 74 29 2e 77 68 57 69 6e |(**whLis|t).whWin|
|00004250| 64 29 3b 0d 0d 09 6f 6c | 64 46 6c 61 67 20 3d 20 |d);...ol|dFlag = |
|00004260| 6d 68 44 72 61 77 42 61 | 72 4f 6e 52 6d 76 65 3b |mhDrawBa|rOnRmve;|
|00004270| 0d 09 6d 68 44 72 61 77 | 42 61 72 4f 6e 52 6d 76 |..mhDraw|BarOnRmv|
|00004280| 65 20 3d 20 66 61 6c 73 | 65 3b 0d 09 77 68 69 6c |e = fals|e;..whil|
|00004290| 65 20 28 6d 68 4c 69 73 | 74 20 21 3d 20 28 4d 48 |e (mhLis|t != (MH|
|000042a0| 48 61 6e 64 6c 65 29 20 | 6e 69 6c 29 0d 09 09 53 |Handle) |nil)...S|
|000042b0| 6b 65 6c 52 6d 76 65 4d | 65 6e 75 20 28 47 65 74 |kelRmveM|enu (Get|
|000042c0| 4d 48 61 6e 64 6c 65 28 | 28 2a 2a 6d 68 4c 69 73 |MHandle(|(**mhLis|
|000042d0| 74 29 2e 6d 68 49 44 29 | 29 3b 0d 09 6d 68 44 72 |t).mhID)|);..mhDr|
|000042e0| 61 77 42 61 72 4f 6e 52 | 6d 76 65 20 3d 20 6f 6c |awBarOnR|mve = ol|
|000042f0| 64 46 6c 61 67 3b 0d 09 | 44 72 61 77 4d 65 6e 75 |dFlag;..|DrawMenu|
|00004300| 42 61 72 20 28 29 3b 0d | 7d 0d 0d 0d 2f 2a 20 2d |Bar ();.|}.../* -|
|00004310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004320| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004330| 2d 2d 20 2a 2f 0d 2f 2a | 20 45 78 65 63 75 74 69 |-- */./*| Executi|
|00004340| 6f 6e 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 69 |on envir|onment i|
|00004350| 6e 74 65 72 72 6f 67 61 | 74 69 6f 6e 20 2a 2f 0d |nterroga|tion */.|
|00004360| 2f 2a 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/* -----|--------|
|00004370| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004380| 2d 2d 2d 2d 2d 2d 20 2a | 2f 0d 0d 0d 0d 23 64 65 |------ *|/....#de|
|00004390| 66 69 6e 65 20 74 72 61 | 70 4d 61 73 6b 09 30 78 |fine tra|pMask.0x|
|000043a0| 30 38 30 30 0d 0d 73 74 | 61 74 69 63 20 73 68 6f |0800..st|atic sho|
|000043b0| 72 74 0d 4e 75 6d 54 6f | 6f 6c 62 6f 78 54 72 61 |rt.NumTo|olboxTra|
|000043c0| 70 73 20 28 76 6f 69 64 | 29 0d 7b 0d 09 69 66 20 |ps (void|).{..if |
|000043d0| 28 4e 47 65 74 54 72 61 | 70 41 64 64 72 65 73 73 |(NGetTra|pAddress|
|000043e0| 20 28 5f 49 6e 69 74 47 | 72 61 66 2c 20 54 6f 6f | (_InitG|raf, Too|
|000043f0| 6c 54 72 61 70 29 0d 09 | 09 3d 3d 20 4e 47 65 74 |lTrap)..|.== NGet|
|00004400| 54 72 61 70 41 64 64 72 | 65 73 73 20 28 30 78 61 |TrapAddr|ess (0xa|
|00004410| 61 36 65 2c 20 54 6f 6f | 6c 54 72 61 70 29 29 0d |a6e, Too|lTrap)).|
|00004420| 09 09 72 65 74 75 72 6e | 20 28 30 78 32 30 30 29 |..return| (0x200)|
|00004430| 3b 0d 09 72 65 74 75 72 | 6e 20 28 30 78 34 30 30 |;..retur|n (0x400|
|00004440| 29 3b 0d 7d 0d 0d 0d 73 | 74 61 74 69 63 20 54 72 |);.}...s|tatic Tr|
|00004450| 61 70 54 79 70 65 0d 47 | 65 74 54 72 61 70 54 79 |apType.G|etTrapTy|
|00004460| 70 65 20 28 73 68 6f 72 | 74 20 74 68 65 54 72 61 |pe (shor|t theTra|
|00004470| 70 29 0d 7b 0d 09 72 65 | 74 75 72 6e 20 28 28 74 |p).{..re|turn ((t|
|00004480| 68 65 54 72 61 70 20 26 | 20 74 72 61 70 4d 61 73 |heTrap &| trapMas|
|00004490| 6b 29 20 3f 20 54 6f 6f | 6c 54 72 61 70 20 3a 20 |k) ? Too|lTrap : |
|000044a0| 4f 53 54 72 61 70 29 3b | 0d 7d 0d 0d 0d 70 61 73 |OSTrap);|.}...pas|
|000044b0| 63 61 6c 20 42 6f 6f 6c | 65 61 6e 0d 53 6b 65 6c |cal Bool|ean.Skel|
|000044c0| 54 72 61 70 41 76 61 69 | 6c 61 62 6c 65 20 28 73 |TrapAvai|lable (s|
|000044d0| 68 6f 72 74 20 74 68 65 | 54 72 61 70 29 0d 7b 0d |hort the|Trap).{.|
|000044e0| 54 72 61 70 54 79 70 65 | 09 74 54 79 70 65 3b 0d |TrapType|.tType;.|
|000044f0| 0d 09 69 66 20 28 28 74 | 54 79 70 65 20 3d 20 47 |..if ((t|Type = G|
|00004500| 65 74 54 72 61 70 54 79 | 70 65 20 28 74 68 65 54 |etTrapTy|pe (theT|
|00004510| 72 61 70 29 29 20 3d 3d | 20 54 6f 6f 6c 54 72 61 |rap)) ==| ToolTra|
|00004520| 70 29 0d 09 7b 0d 09 09 | 74 68 65 54 72 61 70 20 |p)..{...|theTrap |
|00004530| 26 3d 20 30 78 30 37 66 | 66 3b 0d 09 09 69 66 20 |&= 0x07f|f;...if |
|00004540| 28 74 68 65 54 72 61 70 | 20 3e 3d 20 4e 75 6d 54 |(theTrap| >= NumT|
|00004550| 6f 6f 6c 62 6f 78 54 72 | 61 70 73 20 28 29 29 0d |oolboxTr|aps ()).|
|00004560| 09 09 09 74 68 65 54 72 | 61 70 20 3d 20 5f 55 6e |...theTr|ap = _Un|
|00004570| 69 6d 70 6c 65 6d 65 6e | 74 65 64 3b 0d 09 7d 0d |implemen|ted;..}.|
|00004580| 09 72 65 74 75 72 6e 20 | 28 4e 47 65 74 54 72 61 |.return |(NGetTra|
|00004590| 70 41 64 64 72 65 73 73 | 20 28 74 68 65 54 72 61 |pAddress| (theTra|
|000045a0| 70 2c 20 74 54 79 70 65 | 29 0d 09 09 09 09 21 3d |p, tType|).....!=|
|000045b0| 20 4e 47 65 74 54 72 61 | 70 41 64 64 72 65 73 73 | NGetTra|pAddress|
|000045c0| 20 28 5f 55 6e 69 6d 70 | 6c 65 6d 65 6e 74 65 64 | (_Unimp|lemented|
|000045d0| 2c 20 54 6f 6f 6c 54 72 | 61 70 29 29 3b 0d 7d 0d |, ToolTr|ap));.}.|
|000045e0| 0d 0d 2f 2a 0d 20 2a 20 | 51 75 65 72 79 20 74 68 |../*. * |Query th|
|000045f0| 65 20 54 72 61 6e 73 53 | 6b 65 6c 20 65 78 65 63 |e TransS|kel exec|
|00004600| 75 74 69 6f 6e 20 65 6e | 76 69 72 6f 6e 6d 65 6e |ution en|vironmen|
|00004610| 74 2e 20 20 53 68 6f 75 | 6c 64 6e 27 74 20 62 65 |t. Shou|ldn't be|
|00004620| 20 63 61 6c 6c 65 64 20 | 75 6e 74 69 6c 0d 20 2a | called |until. *|
|00004630| 20 61 66 74 65 72 20 53 | 6b 65 6c 49 6e 69 74 28 | after S|kelInit(|
|00004640| 29 20 68 61 73 20 62 65 | 65 6e 20 63 61 6c 6c 65 |) has be|en calle|
|00004650| 64 2e 20 20 52 65 73 75 | 6c 74 20 69 73 20 75 6e |d. Resu|lt is un|
|00004660| 64 65 66 69 6e 65 64 20 | 69 66 20 73 65 6c 65 63 |defined |if selec|
|00004670| 74 6f 72 20 69 73 6e 27 | 74 0d 20 2a 20 6c 65 67 |tor isn'|t. * leg|
|00004680| 61 6c 2e 0d 20 2a 2f 0d | 0d 70 61 73 63 61 6c 20 |al.. */.|.pascal |
|00004690| 6c 6f 6e 67 0d 53 6b 65 | 6c 51 75 65 72 79 20 28 |long.Ske|lQuery (|
|000046a0| 73 68 6f 72 74 20 73 65 | 6c 65 63 74 6f 72 29 0d |short se|lector).|
|000046b0| 7b 0d 6c 6f 6e 67 09 72 | 65 73 75 6c 74 3b 0d 52 |{.long.r|esult;.R|
|000046c0| 65 63 74 09 72 3b 0d 52 | 67 6e 48 61 6e 64 6c 65 |ect.r;.R|gnHandle|
|000046d0| 09 72 67 6e 3b 0d 0d 09 | 73 77 69 74 63 68 20 28 |.rgn;...|switch (|
|000046e0| 73 65 6c 65 63 74 6f 72 | 29 0d 09 7b 0d 09 63 61 |selector|)..{..ca|
|000046f0| 73 65 20 73 6b 65 6c 51 | 56 65 72 73 69 6f 6e 3a |se skelQ|Version:|
|00004700| 0d 09 09 72 65 73 75 6c | 74 20 3d 20 28 28 6c 6f |...resul|t = ((lo|
|00004710| 6e 67 29 20 73 6b 65 6c | 4d 61 6a 6f 72 52 65 6c |ng) skel|MajorRel|
|00004720| 65 61 73 65 20 3c 3c 20 | 31 36 29 20 7c 20 73 6b |ease << |16) | sk|
|00004730| 65 6c 4d 69 6e 6f 72 52 | 65 6c 65 61 73 65 3b 0d |elMinorR|elease;.|
|00004740| 09 09 62 72 65 61 6b 3b | 0d 09 63 61 73 65 20 73 |..break;|..case s|
|00004750| 6b 65 6c 51 53 79 73 56 | 65 72 73 69 6f 6e 3a 0d |kelQSysV|ersion:.|
|00004760| 09 09 72 65 73 75 6c 74 | 20 3d 20 73 79 73 56 65 |..result| = sysVe|
|00004770| 72 73 69 6f 6e 3b 0d 09 | 09 62 72 65 61 6b 3b 0d |rsion;..|.break;.|
|00004780| 09 63 61 73 65 20 73 6b | 65 6c 51 48 61 73 57 4e |.case sk|elQHasWN|
|00004790| 45 3a 0d 09 09 72 65 73 | 75 6c 74 20 3d 20 68 61 |E:...res|ult = ha|
|000047a0| 73 57 4e 45 20 3f 20 31 | 20 3a 20 30 3b 0d 09 09 |sWNE ? 1| : 0;...|
|000047b0| 62 72 65 61 6b 3b 0d 09 | 63 61 73 65 20 73 6b 65 |break;..|case ske|
|000047c0| 6c 51 48 61 73 36 34 4b | 52 4f 4d 3a 0d 09 09 72 |lQHas64K|ROM:...r|
|000047d0| 65 73 75 6c 74 20 3d 20 | 68 61 73 36 34 4b 52 4f |esult = |has64KRO|
|000047e0| 4d 20 3f 20 31 20 3a 20 | 30 3b 0d 09 09 62 72 65 |M ? 1 : |0;...bre|
|000047f0| 61 6b 3b 0d 09 63 61 73 | 65 20 73 6b 65 6c 51 4d |ak;..cas|e skelQM|
|00004800| 42 61 72 48 65 69 67 68 | 74 3a 0d 09 09 72 65 73 |BarHeigh|t:...res|
|00004810| 75 6c 74 20 3d 20 6d 42 | 61 72 48 65 69 67 68 74 |ult = mB|arHeight|
|00004820| 3b 0d 09 09 62 72 65 61 | 6b 3b 0d 09 63 61 73 65 |;...brea|k;..case|
|00004830| 20 73 6b 65 6c 51 48 61 | 73 43 6f 6c 6f 72 51 44 | skelQHa|sColorQD|
|00004840| 3a 0d 09 09 72 65 73 75 | 6c 74 20 3d 20 73 6b 65 |:...resu|lt = ske|
|00004850| 6c 45 6e 76 2e 68 61 73 | 43 6f 6c 6f 72 51 44 20 |lEnv.has|ColorQD |
|00004860| 3f 20 31 20 3a 20 30 3b | 0d 09 09 62 72 65 61 6b |? 1 : 0;|...break|
|00004870| 3b 0d 09 63 61 73 65 20 | 73 6b 65 6c 51 51 44 56 |;..case |skelQQDV|
|00004880| 65 72 73 69 6f 6e 3a 0d | 09 09 2f 2a 20 67 65 74 |ersion:.|../* get|
|00004890| 20 51 75 69 63 6b 44 72 | 61 77 20 76 65 72 73 69 | QuickDr|aw versi|
|000048a0| 6f 6e 20 6e 75 6d 62 65 | 72 20 2a 2f 0d 09 09 69 |on numbe|r */...i|
|000048b0| 66 20 28 21 68 61 73 47 | 65 73 74 61 6c 74 0d 09 |f (!hasG|estalt..|
|000048c0| 09 09 7c 7c 20 47 65 73 | 74 61 6c 74 20 28 67 65 |..|| Ges|talt (ge|
|000048d0| 73 74 61 6c 74 51 75 69 | 63 6b 64 72 61 77 56 65 |staltQui|ckdrawVe|
|000048e0| 72 73 69 6f 6e 2c 20 26 | 72 65 73 75 6c 74 29 20 |rsion, &|result) |
|000048f0| 21 3d 20 6e 6f 45 72 72 | 29 0d 09 09 09 72 65 73 |!= noErr|)....res|
|00004900| 75 6c 74 20 3d 20 30 3b | 09 09 09 09 09 2f 2a 20 |ult = 0;|...../* |
|00004910| 61 73 73 75 6d 65 20 6f | 72 69 67 69 6e 61 6c 20 |assume o|riginal |
|00004920| 51 75 69 63 6b 44 72 61 | 77 20 2a 2f 0d 09 09 62 |QuickDra|w */...b|
|00004930| 72 65 61 6b 3b 0d 09 63 | 61 73 65 20 73 6b 65 6c |reak;..c|ase skel|
|00004940| 51 49 6e 46 6f 72 65 67 | 72 6f 75 6e 64 3a 0d 09 |QInForeg|round:..|
|00004950| 09 72 65 73 75 6c 74 20 | 3d 20 69 6e 46 6f 72 65 |.result |= inFore|
|00004960| 67 72 6f 75 6e 64 20 3f | 20 31 20 3a 20 30 3b 0d |ground ?| 1 : 0;.|
|00004970| 09 09 62 72 65 61 6b 3b | 0d 09 63 61 73 65 20 73 |..break;|..case s|
|00004980| 6b 65 6c 51 48 61 73 47 | 65 73 74 61 6c 74 3a 0d |kelQHasG|estalt:.|
|00004990| 09 09 72 65 73 75 6c 74 | 20 3d 20 68 61 73 47 65 |..result| = hasGe|
|000049a0| 73 74 61 6c 74 20 3f 20 | 31 20 3a 20 30 3b 0d 09 |stalt ? |1 : 0;..|
|000049b0| 09 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 73 6b |.break;.|.case sk|
|000049c0| 65 6c 51 48 61 73 41 70 | 70 6c 65 45 76 65 6e 74 |elQHasAp|pleEvent|
|000049d0| 73 3a 0d 09 09 72 65 73 | 75 6c 74 20 3d 20 68 61 |s:...res|ult = ha|
|000049e0| 73 41 70 70 6c 65 45 76 | 65 6e 74 73 20 3f 20 31 |sAppleEv|ents ? 1|
|000049f0| 20 3a 20 30 3b 0d 09 09 | 62 72 65 61 6b 3b 0d 09 | : 0;...|break;..|
|00004a00| 63 61 73 65 20 73 6b 65 | 6c 51 47 72 61 79 52 67 |case ske|lQGrayRg|
|00004a10| 6e 3a 0d 09 09 72 67 6e | 20 3d 20 4e 65 77 52 67 |n:...rgn| = NewRg|
|00004a20| 6e 20 28 29 3b 0d 09 09 | 69 66 20 28 72 67 6e 20 |n ();...|if (rgn |
|00004a30| 21 3d 20 28 52 67 6e 48 | 61 6e 64 6c 65 29 20 6e |!= (RgnH|andle) n|
|00004a40| 69 6c 29 0d 09 09 7b 0d | 09 09 09 69 66 20 28 68 |il)...{.|...if (h|
|00004a50| 61 73 36 34 4b 52 4f 4d | 29 0d 09 09 09 7b 0d 09 |as64KROM|)....{..|
|00004a60| 09 09 09 72 20 3d 20 73 | 63 72 65 65 6e 42 69 74 |...r = s|creenBit|
|00004a70| 73 2e 62 6f 75 6e 64 73 | 3b 0d 09 09 09 09 72 2e |s.bounds|;.....r.|
|00004a80| 74 6f 70 20 2b 3d 20 6d | 42 61 72 48 65 69 67 68 |top += m|BarHeigh|
|00004a90| 74 3b 0d 09 09 09 09 52 | 65 63 74 52 67 6e 20 28 |t;.....R|ectRgn (|
|00004aa0| 72 67 6e 2c 20 26 72 29 | 3b 0d 09 09 09 7d 0d 09 |rgn, &r)|;....}..|
|00004ab0| 09 09 65 6c 73 65 0d 09 | 09 09 7b 0d 09 09 09 09 |..else..|..{.....|
|00004ac0| 2f 2a 20 47 65 74 47 72 | 61 79 52 67 6e 20 28 29 |/* GetGr|ayRgn ()|
|00004ad0| 20 61 6c 72 65 61 64 79 | 20 74 61 6b 65 73 20 6d | already| takes m|
|00004ae0| 65 6e 75 20 62 61 72 20 | 69 6e 74 6f 20 61 63 63 |enu bar |into acc|
|00004af0| 6f 75 6e 74 20 2a 2f 0d | 09 09 09 09 43 6f 70 79 |ount */.|....Copy|
|00004b00| 52 67 6e 20 28 47 65 74 | 47 72 61 79 52 67 6e 20 |Rgn (Get|GrayRgn |
|00004b10| 28 29 2c 20 72 67 6e 29 | 3b 0d 09 09 09 7d 0d 09 |(), rgn)|;....}..|
|00004b20| 09 7d 0d 09 09 72 65 73 | 75 6c 74 20 3d 20 28 6c |.}...res|ult = (l|
|00004b30| 6f 6e 67 29 20 72 67 6e | 3b 0d 09 09 62 72 65 61 |ong) rgn|;...brea|
|00004b40| 6b 3b 0d 09 64 65 66 61 | 75 6c 74 3a 0d 09 09 2f |k;..defa|ult:.../|
|00004b50| 2a 20 72 65 73 75 6c 74 | 20 69 73 20 75 6e 64 65 |* result| is unde|
|00004b60| 66 69 6e 65 64 21 20 2a | 2f 0d 09 09 62 72 65 61 |fined! *|/...brea|
|00004b70| 6b 3b 0d 09 7d 0d 09 72 | 65 74 75 72 6e 20 28 72 |k;..}..r|eturn (r|
|00004b80| 65 73 75 6c 74 29 3b 0d | 7d 0d 0d 2f 2a 20 2d 2d |esult);.|}../* --|
|00004b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004bb0| 2d 2d 2d 20 2a 2f 0d 2f | 2a 20 45 76 65 6e 74 20 |--- */./|* Event |
|00004bc0| 6c 6f 6f 70 20 69 6e 69 | 74 69 61 74 69 6f 6e 20 |loop ini|tiation |
|00004bd0| 61 6e 64 20 74 65 72 6d | 69 6e 61 74 69 6f 6e 20 |and term|ination |
|00004be0| 2a 2f 0d 2f 2a 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*/./* --|--------|
|00004bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 20 2a 2f 0d 0d |--------|--- */..|
|00004c10| 0d 2f 2a 0d 20 2a 20 4d | 61 69 6e 20 65 76 65 6e |./*. * M|ain even|
|00004c20| 74 20 6c 6f 6f 70 2e 0d | 20 2a 0d 20 2a 20 2d 20 |t loop..| *. * - |
|00004c30| 54 61 6b 65 20 63 61 72 | 65 20 6f 66 20 44 41 27 |Take car|e of DA'|
|00004c40| 73 20 77 69 74 68 20 53 | 79 73 74 65 6d 54 61 73 |s with S|ystemTas|
|00004c50| 6b 28 29 20 69 66 20 6e | 65 63 65 73 73 61 72 79 |k() if n|ecessary|
|00004c60| 2e 0d 20 2a 20 2d 20 47 | 65 74 20 61 6e 20 65 76 |.. * - G|et an ev|
|00004c70| 65 6e 74 2e 0d 20 2a 20 | 2d 20 50 61 73 73 20 65 |ent.. * |- Pass e|
|00004c80| 76 65 6e 74 20 74 6f 20 | 65 76 65 6e 74 20 72 6f |vent to |event ro|
|00004c90| 75 74 65 72 2e 0d 20 2a | 20 2d 20 49 66 20 6e 6f |uter.. *| - If no|
|00004ca0| 20 65 76 65 6e 74 2c 20 | 63 61 6c 6c 20 74 68 65 | event, |call the|
|00004cb0| 20 22 6e 6f 2d 65 76 65 | 6e 74 22 20 68 61 6e 64 | "no-eve|nt" hand|
|00004cc0| 6c 65 72 20 66 6f 72 20 | 74 68 65 20 66 72 6f 6e |ler for |the fron|
|00004cd0| 74 20 77 69 6e 64 6f 77 | 20 61 6e 64 20 66 6f 72 |t window| and for|
|00004ce0| 0d 20 2a 20 61 6e 79 20 | 6f 74 68 65 72 20 77 69 |. * any |other wi|
|00004cf0| 6e 64 6f 77 73 20 77 69 | 74 68 20 69 64 6c 65 20 |ndows wi|th idle |
|00004d00| 70 72 6f 63 65 64 75 72 | 65 73 20 74 68 61 74 20 |procedur|es that |
|00004d10| 61 72 65 20 61 6c 77 61 | 79 73 20 73 75 70 70 6f |are alwa|ys suppo|
|00004d20| 73 65 64 0d 20 2a 20 74 | 6f 20 72 75 6e 2e 20 20 |sed. * t|o run. |
|00004d30| 54 68 69 73 20 69 73 20 | 64 6f 6e 65 20 69 6e 20 |This is |done in |
|00004d40| 73 75 63 68 20 61 20 77 | 61 79 20 74 68 61 74 20 |such a w|ay that |
|00004d50| 69 74 20 69 73 20 73 61 | 66 65 20 66 6f 72 20 69 |it is sa|fe for i|
|00004d60| 64 6c 65 20 70 72 6f 63 | 73 0d 20 2a 20 74 6f 20 |dle proc|s. * to |
|00004d70| 72 65 6d 6f 76 65 20 74 | 68 65 20 77 69 6e 64 6f |remove t|he windo|
|00004d80| 77 20 68 61 6e 64 6c 65 | 72 20 66 6f 72 20 74 68 |w handle|r for th|
|00004d90| 65 69 72 20 6f 77 6e 20 | 77 69 6e 64 6f 77 20 69 |eir own |window i|
|00004da0| 66 20 74 68 65 79 20 77 | 61 6e 74 0d 20 2a 20 28 |f they w|ant. * (|
|00004db0| 75 6e 6c 69 6b 65 6c 79 | 2c 20 62 75 74 2e 2e 2e |unlikely|, but...|
|00004dc0| 29 20 20 54 68 69 73 20 | 6c 6f 6f 70 20 64 6f 65 |) This |loop doe|
|00004dd0| 73 6e 27 74 20 63 68 65 | 63 6b 20 77 68 65 74 68 |sn't che|ck wheth|
|00004de0| 65 72 20 74 68 65 20 77 | 69 6e 64 6f 77 20 69 73 |er the w|indow is|
|00004df0| 0d 20 2a 20 72 65 61 6c | 6c 79 20 61 20 64 69 61 |. * real|ly a dia|
|00004e00| 6c 6f 67 20 77 69 6e 64 | 6f 77 20 6f 72 20 6e 6f |log wind|ow or no|
|00004e10| 74 2c 20 62 75 74 20 69 | 74 20 64 6f 65 73 6e 27 |t, but i|t doesn'|
|00004e20| 74 20 68 61 76 65 20 74 | 6f 2c 20 62 65 63 61 75 |t have t|o, becau|
|00004e30| 73 65 20 73 75 63 68 0d | 20 2a 20 74 68 69 6e 67 |se such.| * thing|
|00004e40| 73 20 61 6c 77 61 79 73 | 20 68 61 76 65 20 61 20 |s always| have a |
|00004e50| 6e 69 6c 20 69 64 6c 65 | 20 70 72 6f 63 2e 0d 20 |nil idle| proc.. |
|00004e60| 2a 09 0d 20 2a 20 64 6f | 6e 65 46 6c 61 67 20 69 |*.. * do|neFlag i|
|00004e70| 73 20 72 65 73 74 6f 72 | 65 64 20 74 6f 20 69 74 |s restor|ed to it|
|00004e80| 73 20 70 72 65 76 69 6f | 75 73 20 76 61 6c 75 65 |s previo|us value|
|00004e90| 20 75 70 6f 6e 20 65 78 | 69 74 2e 20 20 54 68 69 | upon ex|it. Thi|
|00004ea0| 73 20 61 6c 6c 6f 77 73 | 0d 20 2a 20 53 6b 65 6c |s allows|. * Skel|
|00004eb0| 45 76 65 6e 74 4c 6f 6f | 70 28 29 20 74 6f 20 62 |EventLoo|p() to b|
|00004ec0| 65 20 63 61 6c 6c 65 64 | 20 72 65 63 75 72 73 69 |e called| recursi|
|00004ed0| 76 65 6c 79 2e 0d 20 2a | 2f 0d 0d 70 61 73 63 61 |vely.. *|/..pasca|
|00004ee0| 6c 20 76 6f 69 64 0d 53 | 6b 65 6c 45 76 65 6e 74 |l void.S|kelEvent|
|00004ef0| 4c 6f 6f 70 20 28 76 6f | 69 64 29 0d 7b 0d 45 76 |Loop (vo|id).{.Ev|
|00004f00| 65 6e 74 52 65 63 6f 72 | 64 09 74 68 65 45 76 65 |entRecor|d.theEve|
|00004f10| 6e 74 3b 0d 57 48 48 61 | 6e 64 6c 65 09 77 68 2c |nt;.WHHa|ndle.wh,|
|00004f20| 20 77 68 32 3b 0d 57 69 | 6e 64 6f 77 50 74 72 09 | wh2;.Wi|ndowPtr.|
|00004f30| 77 3b 0d 42 6f 6f 6c 65 | 61 6e 09 09 68 61 76 65 |w;.Boole|an..have|
|00004f40| 45 76 65 6e 74 3b 0d 47 | 72 61 66 50 74 72 09 09 |Event;.G|rafPtr..|
|00004f50| 74 6d 70 50 6f 72 74 3b | 0d 42 6f 6f 6c 65 61 6e |tmpPort;|.Boolean|
|00004f60| 09 09 6f 6c 64 44 6f 6e | 65 46 6c 61 67 3b 0d 6c |..oldDon|eFlag;.l|
|00004f70| 6f 6e 67 09 09 77 61 69 | 74 54 69 6d 65 3b 0d 53 |ong..wai|tTime;.S|
|00004f80| 6b 65 6c 57 69 6e 64 49 | 64 6c 65 50 72 6f 63 50 |kelWindI|dleProcP|
|00004f90| 74 72 09 70 3b 0d 0d 09 | 6f 6c 64 44 6f 6e 65 46 |tr.p;...|oldDoneF|
|00004fa0| 6c 61 67 20 3d 20 64 6f | 6e 65 46 6c 61 67 3b 09 |lag = do|neFlag;.|
|00004fb0| 09 2f 2a 20 73 61 76 65 | 20 69 6e 20 63 61 73 65 |./* save| in case|
|00004fc0| 20 74 68 69 73 20 69 73 | 20 61 20 72 65 63 75 72 | this is| a recur|
|00004fd0| 73 69 76 65 20 63 61 6c | 6c 20 2a 2f 0d 09 64 6f |sive cal|l */..do|
|00004fe0| 6e 65 46 6c 61 67 20 3d | 20 66 61 6c 73 65 3b 09 |neFlag =| false;.|
|00004ff0| 09 09 2f 2a 20 73 65 74 | 20 66 6f 72 20 74 68 69 |../* set| for thi|
|00005000| 73 20 63 61 6c 6c 20 2a | 2f 0d 09 77 68 69 6c 65 |s call *|/..while|
|00005010| 20 28 21 64 6f 6e 65 46 | 6c 61 67 29 0d 09 7b 0d | (!doneF|lag)..{.|
|00005020| 09 09 2f 2a 0d 09 09 20 | 2a 20 43 61 6e 6e 6f 74 |../*... |* Cannot|
|00005030| 20 61 73 73 75 6d 65 20 | 74 68 65 20 65 76 65 6e | assume |the even|
|00005040| 74 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 6e 75 6c |t contai|ns a nul|
|00005050| 6c 20 65 76 65 6e 74 20 | 69 66 20 74 68 65 20 47 |l event |if the G|
|00005060| 65 74 4e 65 78 74 45 76 | 65 6e 74 28 29 0d 09 09 |etNextEv|ent()...|
|00005070| 20 2a 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 | * retur|n value |
|00005080| 69 73 20 66 61 6c 73 65 | 2e 20 20 47 65 74 4e 65 |is false|. GetNe|
|00005090| 78 74 45 76 65 6e 74 28 | 29 20 63 61 6c 6c 73 20 |xtEvent(|) calls |
|000050a0| 53 79 73 74 65 6d 45 76 | 65 6e 74 28 29 20 74 6f |SystemEv|ent() to|
|000050b0| 20 68 61 6e 64 6c 65 0d | 09 09 20 2a 20 73 6f 6d | handle.|.. * som|
|000050c0| 65 20 44 41 20 65 76 65 | 6e 74 73 2c 20 61 6e 64 |e DA eve|nts, and|
|000050d0| 20 72 65 74 75 72 6e 73 | 20 66 61 6c 73 65 20 69 | returns| false i|
|000050e0| 66 20 74 68 65 20 65 76 | 65 6e 74 20 77 61 73 20 |f the ev|ent was |
|000050f0| 68 61 6e 64 6c 65 64 2e | 20 20 48 6f 77 65 76 65 |handled.| Howeve|
|00005100| 72 2c 0d 09 09 20 2a 20 | 69 6e 20 73 75 63 68 20 |r,... * |in such |
|00005110| 63 61 73 65 73 20 74 68 | 65 20 65 76 65 6e 74 20 |cases th|e event |
|00005120| 72 65 63 6f 72 64 20 6d | 61 79 20 73 74 69 6c 6c |record m|ay still|
|00005130| 20 68 61 76 65 20 74 68 | 65 20 65 76 65 6e 74 20 | have th|e event |
|00005140| 74 68 61 74 20 6f 63 63 | 75 72 72 65 64 2c 0d 09 |that occ|urred,..|
|00005150| 09 20 2a 20 2a 6e 6f 74 | 2a 20 61 20 6e 75 6c 6c |. * *not|* a null|
|00005160| 20 65 76 65 6e 74 2e 20 | 20 54 6f 20 61 76 6f 69 | event. | To avoi|
|00005170| 64 20 70 72 6f 62 6c 65 | 6d 73 20 6c 61 74 65 72 |d proble|ms later|
|00005180| 20 77 69 74 68 20 6d 69 | 73 69 6e 74 65 72 70 72 | with mi|sinterpr|
|00005190| 65 74 69 6e 67 20 74 68 | 65 0d 09 09 20 2a 20 65 |eting th|e... * e|
|000051a0| 76 65 6e 74 20 61 73 20 | 6e 6f 6e 2d 6e 75 6c 6c |vent as |non-null|
|000051b0| 2c 20 66 6f 72 63 65 20 | 69 74 20 74 6f 20 6c 6f |, force |it to lo|
|000051c0| 6f 6b 20 6c 69 6b 65 20 | 61 20 6e 75 6c 6c 20 65 |ok like |a null e|
|000051d0| 76 65 6e 74 2e 0d 09 09 | 20 2a 2f 0d 0d 09 09 69 |vent....| */....i|
|000051e0| 66 20 28 68 61 73 57 4e | 45 29 0d 09 09 7b 0d 09 |f (hasWN|E)...{..|
|000051f0| 09 09 77 61 69 74 54 69 | 6d 65 20 3d 20 28 69 6e |..waitTi|me = (in|
|00005200| 46 6f 72 65 67 72 6f 75 | 6e 64 20 3f 20 66 67 57 |Foregrou|nd ? fgW|
|00005210| 61 69 74 54 69 6d 65 20 | 3a 20 62 67 57 61 69 74 |aitTime |: bgWait|
|00005220| 54 69 6d 65 29 3b 0d 09 | 09 09 68 61 76 65 45 76 |Time);..|..haveEv|
|00005230| 65 6e 74 20 3d 20 57 61 | 69 74 4e 65 78 74 45 76 |ent = Wa|itNextEv|
|00005240| 65 6e 74 20 28 65 76 65 | 6e 74 4d 61 73 6b 2c 20 |ent (eve|ntMask, |
|00005250| 26 74 68 65 45 76 65 6e | 74 2c 20 77 61 69 74 54 |&theEven|t, waitT|
|00005260| 69 6d 65 2c 20 6e 69 6c | 29 3b 0d 09 09 7d 0d 09 |ime, nil|);...}..|
|00005270| 09 65 6c 73 65 0d 09 09 | 7b 0d 09 09 09 53 79 73 |.else...|{....Sys|
|00005280| 74 65 6d 54 61 73 6b 20 | 28 29 3b 0d 09 09 09 68 |temTask |();....h|
|00005290| 61 76 65 45 76 65 6e 74 | 20 3d 20 47 65 74 4e 65 |aveEvent| = GetNe|
|000052a0| 78 74 45 76 65 6e 74 20 | 28 65 76 65 6e 74 4d 61 |xtEvent |(eventMa|
|000052b0| 73 6b 2c 20 26 74 68 65 | 45 76 65 6e 74 29 3b 0d |sk, &the|Event);.|
|000052c0| 09 09 7d 0d 0d 09 09 69 | 66 20 28 21 68 61 76 65 |..}....i|f (!have|
|000052d0| 45 76 65 6e 74 29 0d 09 | 09 09 74 68 65 45 76 65 |Event)..|..theEve|
|000052e0| 6e 74 2e 77 68 61 74 20 | 3d 20 6e 75 6c 6c 45 76 |nt.what |= nullEv|
|000052f0| 65 6e 74 3b 0d 0d 09 09 | 53 6b 65 6c 52 6f 75 74 |ent;....|SkelRout|
|00005300| 65 45 76 65 6e 74 20 28 | 26 74 68 65 45 76 65 6e |eEvent (|&theEven|
|00005310| 74 29 3b 0d 0d 09 09 2f | 2a 0d 09 09 20 2a 20 52 |t);..../|*... * R|
|00005320| 75 6e 20 61 70 70 6c 69 | 63 61 62 6c 65 20 77 69 |un appli|cable wi|
|00005330| 6e 64 6f 77 20 69 64 6c | 65 20 70 72 6f 63 73 2e |ndow idl|e procs.|
|00005340| 20 20 4d 61 6b 65 20 73 | 75 72 65 20 74 6f 20 73 | Make s|ure to s|
|00005350| 61 76 65 20 61 6e 64 20 | 72 65 73 74 6f 72 65 0d |ave and |restore.|
|00005360| 09 09 20 2a 20 74 68 65 | 20 70 6f 72 74 2c 20 73 |.. * the| port, s|
|00005370| 69 6e 63 65 20 69 64 6c | 65 20 70 72 6f 63 73 20 |ince idl|e procs |
|00005380| 66 6f 72 20 74 68 65 20 | 6e 6f 6e 2d 61 63 74 69 |for the |non-acti|
|00005390| 76 65 20 77 69 6e 64 6f | 77 20 6d 61 79 20 62 65 |ve windo|w may be|
|000053a0| 20 72 75 6e 2e 0d 09 09 | 20 2a 20 4e 6f 6e 65 20 | run....| * None |
|000053b0| 6f 66 20 74 68 65 6d 20 | 72 75 6e 20 77 68 65 6e |of them |run when|
|000053c0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|000053d0| 20 69 73 20 73 75 73 70 | 65 6e 64 65 64 2e 0d 09 | is susp|ended...|
|000053e0| 09 20 2a 2f 0d 0d 09 09 | 69 66 20 28 69 6e 46 6f |. */....|if (inFo|
|000053f0| 72 65 67 72 6f 75 6e 64 | 20 26 26 20 21 68 61 76 |reground| && !hav|
|00005400| 65 45 76 65 6e 74 29 0d | 09 09 7b 0d 09 09 09 47 |eEvent).|..{....G|
|00005410| 65 74 50 6f 72 74 20 28 | 26 74 6d 70 50 6f 72 74 |etPort (|&tmpPort|
|00005420| 29 3b 0d 09 09 09 66 6f | 72 20 28 77 68 20 3d 20 |);....fo|r (wh = |
|00005430| 77 68 4c 69 73 74 3b 20 | 77 68 20 21 3d 20 28 57 |whList; |wh != (W|
|00005440| 48 48 61 6e 64 6c 65 29 | 20 6e 69 6c 3b 20 77 68 |HHandle)| nil; wh|
|00005450| 20 3d 20 77 68 32 29 0d | 09 09 09 7b 0d 09 09 09 | = wh2).|...{....|
|00005460| 09 77 68 32 20 3d 20 28 | 2a 2a 77 68 29 2e 77 68 |.wh2 = (|**wh).wh|
|00005470| 4e 65 78 74 3b 0d 09 09 | 09 09 77 20 3d 20 28 2a |Next;...|..w = (*|
|00005480| 2a 77 68 29 2e 77 68 57 | 69 6e 64 3b 0d 09 09 09 |*wh).whW|ind;....|
|00005490| 09 69 66 20 28 77 20 3d | 3d 20 46 72 6f 6e 74 57 |.if (w =|= FrontW|
|000054a0| 69 6e 64 6f 77 20 28 29 | 20 7c 7c 20 21 28 2a 2a |indow ()| || !(**|
|000054b0| 77 68 29 2e 77 68 46 72 | 6f 6e 74 4f 6e 6c 79 29 |wh).whFr|ontOnly)|
|000054c0| 0d 09 09 09 09 7b 0d 09 | 09 09 09 09 69 66 20 28 |.....{..|....if (|
|000054d0| 28 70 20 3d 20 28 2a 2a | 77 68 29 2e 77 68 49 64 |(p = (**|wh).whId|
|000054e0| 6c 65 29 20 21 3d 20 28 | 53 6b 65 6c 57 69 6e 64 |le) != (|SkelWind|
|000054f0| 49 64 6c 65 50 72 6f 63 | 50 74 72 29 20 6e 69 6c |IdleProc|Ptr) nil|
|00005500| 29 0d 09 09 09 09 09 7b | 0d 09 09 09 09 09 09 69 |)......{|.......i|
|00005510| 66 20 28 21 68 61 73 57 | 4e 45 29 0d 09 09 09 09 |f (!hasW|NE).....|
|00005520| 09 09 09 53 79 73 74 65 | 6d 54 61 73 6b 20 28 29 |...Syste|mTask ()|
|00005530| 3b 0d 09 09 09 09 09 09 | 53 65 74 50 6f 72 74 20 |;.......|SetPort |
|00005540| 28 77 29 3b 0d 09 09 09 | 09 09 09 28 2a 70 29 20 |(w);....|...(*p) |
|00005550| 28 29 3b 0d 09 09 09 09 | 09 7d 0d 09 09 09 09 7d |();.....|.}.....}|
|00005560| 0d 09 09 09 7d 0d 09 09 | 09 53 65 74 50 6f 72 74 |....}...|.SetPort|
|00005570| 20 28 74 6d 70 50 6f 72 | 74 29 3b 0d 09 09 7d 0d | (tmpPor|t);...}.|
|00005580| 09 7d 0d 09 64 6f 6e 65 | 46 6c 61 67 20 3d 20 6f |.}..done|Flag = o|
|00005590| 6c 64 44 6f 6e 65 46 6c | 61 67 3b 09 2f 2a 20 72 |ldDoneFl|ag;./* r|
|000055a0| 65 73 74 6f 72 65 20 69 | 6e 20 63 61 73 65 20 74 |estore i|n case t|
|000055b0| 68 69 73 20 77 61 73 20 | 61 20 72 65 63 75 72 73 |his was |a recurs|
|000055c0| 69 76 65 20 63 61 6c 6c | 20 2a 2f 0d 7d 0d 0d 0d |ive call| */.}...|
|000055d0| 2f 2a 0d 20 2a 20 54 65 | 6c 6c 20 63 75 72 72 65 |/*. * Te|ll curre|
|000055e0| 6e 74 20 69 6e 73 74 61 | 6e 63 65 20 6f 66 20 53 |nt insta|nce of S|
|000055f0| 6b 65 6c 45 76 65 6e 74 | 4c 6f 6f 70 28 29 20 74 |kelEvent|Loop() t|
|00005600| 6f 20 64 72 6f 70 20 64 | 65 61 64 0d 20 2a 2f 0d |o drop d|ead. */.|
|00005610| 0d 70 61 73 63 61 6c 20 | 76 6f 69 64 0d 53 6b 65 |.pascal |void.Ske|
|00005620| 6c 53 74 6f 70 45 76 65 | 6e 74 4c 6f 6f 70 20 28 |lStopEve|ntLoop (|
|00005630| 76 6f 69 64 29 0d 7b 0d | 09 64 6f 6e 65 46 6c 61 |void).{.|.doneFla|
|00005640| 67 20 3d 20 74 72 75 65 | 3b 0d 7d 0d 0d 0d 2f 2a |g = true|;.}.../*|
|00005650| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00005660| 2d 2d 20 2a 2f 0d 2f 2a | 20 45 76 65 6e 74 20 64 |-- */./*| Event d|
|00005670| 69 73 70 61 74 63 68 69 | 6e 67 20 2a 2f 0d 2f 2a |ispatchi|ng */./*|
|00005680| 20 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | -------|--------|
|00005690| 2d 2d 20 2a 2f 0d 0d 0d | 2f 2a 0d 20 2a 20 47 65 |-- */...|/*. * Ge|
|000056a0| 6e 65 72 61 6c 20 65 76 | 65 6e 74 20 64 69 73 70 |neral ev|ent disp|
|000056b0| 61 74 63 68 20 72 6f 75 | 74 69 6e 65 2e 0d 20 2a |atch rou|tine.. *|
|000056c0| 0d 20 2a 20 49 66 20 74 | 68 65 72 65 20 69 73 20 |. * If t|here is |
|000056d0| 61 6e 20 65 76 65 6e 74 | 2d 68 61 6e 64 6c 69 6e |an event|-handlin|
|000056e0| 67 20 68 6f 6f 6b 20 61 | 6e 64 20 69 74 20 68 61 |g hook a|nd it ha|
|000056f0| 6e 64 6c 65 73 20 74 68 | 65 20 65 76 65 6e 74 2c |ndles th|e event,|
|00005700| 20 74 68 65 0d 20 2a 20 | 65 76 65 6e 74 20 69 73 | the. * |event is|
|00005710| 20 6e 6f 74 20 66 75 72 | 74 68 65 72 20 70 72 6f | not fur|ther pro|
|00005720| 63 65 73 73 65 64 20 68 | 65 72 65 2e 20 20 4f 74 |cessed h|ere. Ot|
|00005730| 68 65 72 77 69 73 65 2c | 20 72 75 6e 20 74 68 65 |herwise,| run the|
|00005740| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 27 73 20 69 | applica|tion's i|
|00005750| 64 6c 65 0d 20 2a 20 74 | 69 6d 65 20 70 72 6f 63 |dle. * t|ime proc|
|00005760| 65 73 73 20 69 66 20 74 | 68 65 20 65 76 65 6e 74 |ess if t|he event|
|00005770| 20 69 73 20 61 20 6e 75 | 6c 6c 20 65 76 65 6e 74 | is a nu|ll event|
|00005780| 2c 20 74 68 65 6e 20 70 | 72 6f 63 65 73 73 20 74 |, then p|rocess t|
|00005790| 68 65 20 65 76 65 6e 74 | 2e 0d 20 2a 0d 20 2a 20 |he event|.. *. * |
|000057a0| 4e 75 6c 6c 20 65 76 65 | 6e 74 73 20 61 72 65 20 |Null eve|nts are |
|000057b0| 73 65 6e 74 20 74 68 72 | 6f 75 67 68 20 74 68 65 |sent thr|ough the|
|000057c0| 20 64 69 61 6c 6f 67 20 | 65 76 65 6e 74 20 68 61 | dialog |event ha|
|000057d0| 6e 64 6c 65 72 2e 20 20 | 54 68 69 73 20 69 73 0d |ndler. |This is.|
|000057e0| 20 2a 20 6e 65 63 65 73 | 73 61 72 79 20 74 6f 20 | * neces|sary to |
|000057f0| 6d 61 6b 65 20 73 75 72 | 65 2c 20 69 66 20 64 69 |make sur|e, if di|
|00005800| 61 6c 6f 67 73 20 61 72 | 65 20 73 75 70 70 6f 72 |alogs ar|e suppor|
|00005810| 74 65 64 2c 20 74 68 61 | 74 20 44 69 61 6c 6f 67 |ted, tha|t Dialog|
|00005820| 53 65 6c 65 63 74 28 29 | 0d 20 2a 20 67 65 74 73 |Select()|. * gets|
|00005830| 20 63 61 6c 6c 65 64 20 | 72 65 70 65 61 74 65 64 | called |repeated|
|00005840| 6c 79 2c 20 6f 72 20 74 | 68 65 20 63 61 72 65 74 |ly, or t|he caret|
|00005850| 20 77 6f 6e 27 74 20 62 | 6c 69 6e 6b 20 69 66 20 | won't b|link if |
|00005860| 61 20 64 69 61 6c 6f 67 | 20 68 61 73 20 61 6e 79 |a dialog| has any|
|00005870| 0d 20 2a 20 65 64 69 74 | 54 65 78 74 20 69 74 65 |. * edit|Text ite|
|00005880| 6d 73 2e 0d 20 2a 0d 20 | 2a 20 4e 65 74 77 6f 72 |ms.. *. |* Networ|
|00005890| 6b 20 65 76 65 6e 74 73 | 20 61 72 65 20 6e 6f 74 |k events| are not|
|000058a0| 20 73 75 70 70 6f 72 74 | 65 64 20 61 73 20 70 65 | support|ed as pe|
|000058b0| 72 20 74 68 65 20 64 65 | 70 72 65 63 61 74 69 6f |r the de|precatio|
|000058c0| 6e 20 69 6e 20 54 4e 20 | 4e 57 20 30 37 2e 0d 20 |n in TN |NW 07.. |
|000058d0| 2a 20 41 70 70 6c 69 63 | 61 74 69 6f 6e 2d 64 65 |* Applic|ation-de|
|000058e0| 66 69 6e 65 64 20 65 76 | 65 6e 74 73 20 31 2c 20 |fined ev|ents 1, |
|000058f0| 32 20 61 6e 64 20 33 20 | 61 72 65 20 6e 6f 74 20 |2 and 3 |are not |
|00005900| 68 61 6e 64 6c 65 64 2c | 20 65 69 74 68 65 72 2e |handled,| either.|
|00005910| 0d 20 2a 2f 0d 0d 70 61 | 73 63 61 6c 20 76 6f 69 |. */..pa|scal voi|
|00005920| 64 0d 53 6b 65 6c 52 6f | 75 74 65 45 76 65 6e 74 |d.SkelRo|uteEvent|
|00005930| 20 28 45 76 65 6e 74 52 | 65 63 6f 72 64 20 2a 74 | (EventR|ecord *t|
|00005940| 68 65 45 76 65 6e 74 29 | 0d 7b 0d 50 6f 69 6e 74 |heEvent)|.{.Point|
|00005950| 09 09 65 76 74 50 74 3b | 0d 47 72 61 66 50 74 72 |..evtPt;|.GrafPtr|
|00005960| 09 09 65 76 74 50 6f 72 | 74 3b 0d 73 68 6f 72 74 |..evtPor|t;.short|
|00005970| 09 09 65 76 74 50 61 72 | 74 3b 0d 73 68 6f 72 74 |..evtPar|t;.short|
|00005980| 09 09 65 76 74 4d 6f 64 | 73 3b 0d 63 68 61 72 09 |..evtMod|s;.char.|
|00005990| 09 65 76 74 43 68 61 72 | 3b 0d 6c 6f 6e 67 09 09 |.evtChar|;.long..|
|000059a0| 65 76 74 4d 73 67 65 3b | 0d 75 6e 73 69 67 6e 65 |evtMsge;|.unsigne|
|000059b0| 64 20 63 68 61 72 20 65 | 76 74 43 6f 64 65 3b 0d |d char e|vtCode;.|
|000059c0| 57 69 6e 64 6f 77 50 74 | 72 09 66 72 6f 6e 74 57 |WindowPt|r.frontW|
|000059d0| 69 6e 64 20 3d 20 46 72 | 6f 6e 74 57 69 6e 64 6f |ind = Fr|ontWindo|
|000059e0| 77 20 28 29 3b 0d 57 48 | 48 61 6e 64 6c 65 09 77 |w ();.WH|Handle.w|
|000059f0| 68 3b 0d 73 68 6f 72 74 | 09 6f 73 4d 73 67 65 3b |h;.short|.osMsge;|
|00005a00| 0d 42 6f 6f 6c 65 61 6e | 09 6f 73 52 65 73 75 6d |.Boolean|.osResum|
|00005a10| 65 3b 0d 42 6f 6f 6c 65 | 61 6e 09 6f 73 43 6c 69 |e;.Boole|an.osCli|
|00005a20| 70 43 76 74 3b 0d 52 65 | 63 74 09 72 31 2c 20 72 |pCvt;.Re|ct.r1, r|
|00005a30| 32 3b 0d 57 53 74 61 74 | 65 44 61 74 61 09 2a 2a |2;.WStat|eData.**|
|00005a40| 77 64 68 3b 0d 53 69 67 | 6e 65 64 42 79 74 65 09 |wdh;.Sig|nedByte.|
|00005a50| 73 74 61 74 65 3b 0d 0d | 09 2f 2a 20 73 61 76 65 |state;..|./* save|
|00005a60| 20 76 61 6c 75 65 73 20 | 66 6f 72 20 53 6b 65 6c | values |for Skel|
|00005a70| 47 65 74 43 75 72 72 65 | 6e 74 45 76 65 6e 74 28 |GetCurre|ntEvent(|
|00005a80| 29 20 61 6e 64 20 53 6b | 65 6c 47 65 74 4d 6f 64 |) and Sk|elGetMod|
|00005a90| 69 66 69 65 72 73 28 29 | 20 2a 2f 0d 0d 09 65 76 |ifiers()| */...ev|
|00005aa0| 65 6e 74 50 74 72 20 3d | 20 74 68 65 45 76 65 6e |entPtr =| theEven|
|00005ab0| 74 3b 0d 09 65 76 65 6e | 74 4d 6f 64 69 66 69 65 |t;..even|tModifie|
|00005ac0| 72 73 20 3d 20 74 68 65 | 45 76 65 6e 74 2d 3e 6d |rs = the|Event->m|
|00005ad0| 6f 64 69 66 69 65 72 73 | 3b 0d 0d 09 2f 2a 20 64 |odifiers|;.../* d|
|00005ae0| 6f 6e 27 74 20 62 6f 74 | 68 65 72 20 68 61 6e 64 |on't bot|her hand|
|00005af0| 6c 69 6e 67 20 62 65 6c | 6f 77 20 69 66 20 65 76 |ling bel|ow if ev|
|00005b00| 65 6e 74 20 68 6f 6f 6b | 20 64 6f 65 73 20 73 6f |ent hook| does so|
|00005b10| 20 68 65 72 65 20 2a 2f | 0d 09 0d 09 69 66 20 28 | here */|....if (|
|00005b20| 70 45 76 65 6e 74 20 21 | 3d 20 28 53 6b 65 6c 45 |pEvent !|= (SkelE|
|00005b30| 76 65 6e 74 48 6f 6f 6b | 50 72 6f 63 50 74 72 29 |ventHook|ProcPtr)|
|00005b40| 20 6e 69 6c 20 26 26 20 | 28 2a 70 45 76 65 6e 74 | nil && |(*pEvent|
|00005b50| 29 20 28 74 68 65 45 76 | 65 6e 74 29 29 0d 09 09 |) (theEv|ent))...|
|00005b60| 72 65 74 75 72 6e 3b 0d | 0d 09 2f 2a 0d 09 20 2a |return;.|../*.. *|
|00005b70| 20 47 69 76 65 20 69 64 | 6c 65 20 70 72 6f 63 20 | Give id|le proc |
|00005b80| 61 20 63 68 61 6e 63 65 | 20 61 74 20 6e 75 6c 6c |a chance| at null|
|00005b90| 20 65 76 65 6e 74 73 20 | 73 69 6e 63 65 20 6f 74 | events |since ot|
|00005ba0| 68 65 72 77 69 73 65 20 | 44 6f 44 69 61 6c 6f 67 |herwise |DoDialog|
|00005bb0| 28 29 0d 09 20 2a 20 77 | 69 6c 6c 20 22 68 61 6e |().. * w|ill "han|
|00005bc0| 64 6c 65 22 20 74 68 65 | 6d 20 69 66 20 74 68 65 |dle" the|m if the|
|00005bd0| 72 65 27 73 20 61 20 64 | 69 61 6c 6f 67 20 69 6e |re's a d|ialog in|
|00005be0| 20 66 72 6f 6e 74 2c 20 | 61 6e 64 20 74 68 65 20 | front, |and the |
|00005bf0| 69 64 6c 65 0d 09 20 2a | 20 70 72 6f 63 20 77 69 |idle.. *| proc wi|
|00005c00| 6c 6c 20 6e 65 76 65 72 | 20 73 65 65 20 74 68 65 |ll never| see the|
|00005c10| 6d 2e 0d 09 20 2a 2f 0d | 0d 09 69 66 20 28 74 68 |m... */.|..if (th|
|00005c20| 65 45 76 65 6e 74 2d 3e | 77 68 61 74 20 3d 3d 20 |eEvent->|what == |
|00005c30| 6e 75 6c 6c 45 76 65 6e | 74 20 26 26 20 70 49 64 |nullEven|t && pId|
|00005c40| 6c 65 20 21 3d 20 28 53 | 6b 65 6c 49 64 6c 65 50 |le != (S|kelIdleP|
|00005c50| 72 6f 63 50 74 72 29 20 | 6e 69 6c 29 0d 09 09 28 |rocPtr) |nil)...(|
|00005c60| 2a 70 49 64 6c 65 29 20 | 28 29 3b 0d 0d 23 20 69 |*pIdle) |();..# i|
|00005c70| 66 64 65 66 09 73 75 70 | 70 6f 72 74 44 69 61 6c |fdef.sup|portDial|
|00005c80| 6f 67 73 0d 0d 09 69 66 | 28 44 6f 44 69 61 6c 6f |ogs...if|(DoDialo|
|00005c90| 67 20 28 74 68 65 45 76 | 65 6e 74 29 29 0d 09 09 |g (theEv|ent))...|
|00005ca0| 72 65 74 75 72 6e 3b 0d | 0d 23 20 65 6e 64 69 66 |return;.|.# endif|
|00005cb0| 0d 0d 09 65 76 74 50 74 | 20 3d 20 74 68 65 45 76 |...evtPt| = theEv|
|00005cc0| 65 6e 74 2d 3e 77 68 65 | 72 65 3b 0d 09 65 76 74 |ent->whe|re;..evt|
|00005cd0| 4d 6f 64 73 20 3d 20 74 | 68 65 45 76 65 6e 74 2d |Mods = t|heEvent-|
|00005ce0| 3e 6d 6f 64 69 66 69 65 | 72 73 3b 0d 09 65 76 74 |>modifie|rs;..evt|
|00005cf0| 4d 73 67 65 20 3d 20 74 | 68 65 45 76 65 6e 74 2d |Msge = t|heEvent-|
|00005d00| 3e 6d 65 73 73 61 67 65 | 3b 0d 0d 09 73 77 69 74 |>message|;...swit|
|00005d10| 63 68 20 28 74 68 65 45 | 76 65 6e 74 2d 3e 77 68 |ch (theE|vent->wh|
|00005d20| 61 74 29 0d 09 7b 0d 09 | 63 61 73 65 20 6e 75 6c |at)..{..|case nul|
|00005d30| 6c 45 76 65 6e 74 3a 0d | 09 09 2f 2a 20 64 6f 20 |lEvent:.|../* do |
|00005d40| 6e 6f 74 68 69 6e 67 20 | 2a 2f 0d 09 09 62 72 65 |nothing |*/...bre|
|00005d50| 61 6b 3b 0d 0d 09 2f 2a | 0d 09 20 2a 20 4d 6f 75 |ak;.../*|.. * Mou|
|00005d60| 73 65 20 63 6c 69 63 6b | 2e 20 20 47 65 74 20 74 |se click|. Get t|
|00005d70| 68 65 20 77 69 6e 64 6f | 77 20 74 68 61 74 20 74 |he windo|w that t|
|00005d80| 68 65 20 63 6c 69 63 6b | 20 6f 63 63 75 72 72 65 |he click| occurre|
|00005d90| 64 20 69 6e 2c 20 61 6e | 64 0d 09 20 2a 20 74 68 |d in, an|d.. * th|
|00005da0| 65 20 70 61 72 74 20 6f | 66 20 74 68 65 20 77 69 |e part o|f the wi|
|00005db0| 6e 64 6f 77 2e 20 20 47 | 65 74 57 44 48 61 6e 64 |ndow. G|etWDHand|
|00005dc0| 6c 65 72 28 29 20 69 73 | 20 63 61 6c 6c 65 64 20 |ler() is| called |
|00005dd0| 68 65 72 65 2c 20 6e 6f | 74 0d 09 20 2a 20 47 65 |here, no|t.. * Ge|
|00005de0| 74 57 48 61 6e 64 6c 65 | 72 28 29 2c 20 73 69 6e |tWHandle|r(), sin|
|00005df0| 63 65 20 77 65 20 6e 65 | 65 64 20 74 68 65 20 68 |ce we ne|ed the h|
|00005e00| 61 6e 64 6c 65 72 20 66 | 6f 72 20 61 20 77 69 6e |andler f|or a win|
|00005e10| 64 6f 77 20 77 68 69 63 | 68 0d 09 20 2a 20 6d 69 |dow whic|h.. * mi|
|00005e20| 67 68 74 20 74 75 72 6e | 20 6f 75 74 20 74 6f 20 |ght turn| out to |
|00005e30| 62 65 20 61 20 64 69 61 | 6c 6f 67 20 77 69 6e 64 |be a dia|log wind|
|00005e40| 6f 77 2c 20 65 2e 67 2e | 2c 20 69 66 20 74 68 65 |ow, e.g.|, if the|
|00005e50| 20 63 6c 69 63 6b 20 69 | 73 20 69 6e 0d 09 20 2a | click i|s in.. *|
|00005e60| 20 61 20 63 6c 6f 73 65 | 20 62 6f 78 2e 0d 09 20 | a close| box... |
|00005e70| 2a 2f 0d 09 63 61 73 65 | 20 6d 6f 75 73 65 44 6f |*/..case| mouseDo|
|00005e80| 77 6e 3a 0d 09 09 65 76 | 74 50 61 72 74 20 3d 20 |wn:...ev|tPart = |
|00005e90| 46 69 6e 64 57 69 6e 64 | 6f 77 20 28 65 76 74 50 |FindWind|ow (evtP|
|00005ea0| 74 2c 20 26 65 76 74 50 | 6f 72 74 29 3b 0d 09 09 |t, &evtP|ort);...|
|00005eb0| 77 68 20 3d 20 47 65 74 | 57 44 48 61 6e 64 6c 65 |wh = Get|WDHandle|
|00005ec0| 72 20 28 65 76 74 50 6f | 72 74 29 3b 0d 0d 09 09 |r (evtPo|rt);....|
|00005ed0| 73 77 69 74 63 68 20 28 | 65 76 74 50 61 72 74 29 |switch (|evtPart)|
|00005ee0| 0d 09 09 7b 0d 0d 09 09 | 2f 2a 0d 09 09 20 2a 20 |...{....|/*... * |
|00005ef0| 43 6c 69 63 6b 20 69 6e | 20 64 65 73 6b 20 61 63 |Click in| desk ac|
|00005f00| 63 65 73 73 6f 72 79 20 | 77 69 6e 64 6f 77 2e 20 |cessory |window. |
|00005f10| 20 50 61 73 73 20 62 61 | 63 6b 20 74 6f 20 74 68 | Pass ba|ck to th|
|00005f20| 65 20 73 79 73 74 65 6d | 2e 0d 09 09 20 2a 2f 0d |e system|.... */.|
|00005f30| 09 09 63 61 73 65 20 69 | 6e 53 79 73 57 69 6e 64 |..case i|nSysWind|
|00005f40| 6f 77 3a 0d 09 09 09 53 | 79 73 74 65 6d 43 6c 69 |ow:....S|ystemCli|
|00005f50| 63 6b 20 28 74 68 65 45 | 76 65 6e 74 2c 20 65 76 |ck (theE|vent, ev|
|00005f60| 74 50 6f 72 74 29 3b 0d | 09 09 09 62 72 65 61 6b |tPort);.|...break|
|00005f70| 3b 0d 0d 09 09 2f 2a 0d | 09 09 20 2a 20 43 6c 69 |;..../*.|.. * Cli|
|00005f80| 63 6b 20 69 6e 20 6d 65 | 6e 75 20 62 61 72 2e 20 |ck in me|nu bar. |
|00005f90| 20 54 72 61 63 6b 20 74 | 68 65 20 6d 6f 75 73 65 | Track t|he mouse|
|00005fa0| 20 61 6e 64 20 65 78 65 | 63 75 74 65 0d 09 09 20 | and exe|cute... |
|00005fb0| 2a 20 73 65 6c 65 63 74 | 65 64 20 63 6f 6d 6d 61 |* select|ed comma|
|00005fc0| 6e 64 2c 20 69 66 20 61 | 6e 79 2e 0d 09 09 20 2a |nd, if a|ny.... *|
|00005fd0| 2f 0d 09 09 63 61 73 65 | 20 69 6e 4d 65 6e 75 42 |/...case| inMenuB|
|00005fe0| 61 72 3a 0d 09 09 09 44 | 6f 4d 65 6e 75 48 6f 6f |ar:....D|oMenuHoo|
|00005ff0| 6b 20 28 29 3b 0d 09 09 | 09 44 6f 4d 65 6e 75 43 |k ();...|.DoMenuC|
|00006000| 6f 6d 6d 61 6e 64 20 28 | 4d 65 6e 75 53 65 6c 65 |ommand (|MenuSele|
|00006010| 63 74 20 28 65 76 74 50 | 74 29 29 3b 0d 09 09 09 |ct (evtP|t));....|
|00006020| 62 72 65 61 6b 3b 0d 0d | 09 09 2f 2a 0d 09 09 20 |break;..|../*... |
|00006030| 2a 20 43 6c 69 63 6b 20 | 69 6e 20 67 72 6f 77 20 |* Click |in grow |
|00006040| 62 6f 78 2e 20 20 52 65 | 73 69 7a 65 20 77 69 6e |box. Re|size win|
|00006050| 64 6f 77 2e 0d 09 09 20 | 2a 2f 0d 09 09 63 61 73 |dow.... |*/...cas|
|00006060| 65 20 69 6e 47 72 6f 77 | 3a 0d 09 09 09 44 6f 47 |e inGrow|:....DoG|
|00006070| 72 6f 77 20 28 77 68 2c | 20 65 76 74 50 74 29 3b |row (wh,| evtPt);|
|00006080| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 0d 09 09 2f 2a |....brea|k;..../*|
|00006090| 0d 09 09 20 2a 20 43 6c | 69 63 6b 20 69 6e 20 74 |... * Cl|ick in t|
|000060a0| 69 74 6c 65 20 62 61 72 | 2e 20 20 44 72 61 67 20 |itle bar|. Drag |
|000060b0| 74 68 65 20 77 69 6e 64 | 6f 77 20 61 72 6f 75 6e |the wind|ow aroun|
|000060c0| 64 2e 0d 09 09 20 2a 20 | 50 72 6f 62 6c 65 6d 20 |d.... * |Problem |
|000060d0| 66 69 78 3a 20 20 44 72 | 61 67 57 69 6e 64 6f 77 |fix: Dr|agWindow|
|000060e0| 28 29 20 73 65 65 6d 73 | 20 74 6f 20 63 61 6c 6c |() seems| to call|
|000060f0| 20 53 74 69 6c 6c 44 6f | 77 6e 28 29 0d 09 09 20 | StillDo|wn()... |
|00006100| 2a 20 66 69 72 73 74 2c | 20 73 6f 20 74 68 61 74 |* first,| so that|
|00006110| 20 63 6c 69 63 6b 73 20 | 69 6e 20 64 72 61 67 20 | clicks |in drag |
|00006120| 72 65 67 69 6f 6e 73 20 | 77 68 69 6c 65 20 6d 61 |regions |while ma|
|00006130| 63 68 69 6e 65 20 69 73 | 0d 09 09 20 2a 20 62 75 |chine is|... * bu|
|00006140| 73 79 20 64 6f 6e 27 74 | 20 6f 74 68 65 72 77 69 |sy don't| otherwi|
|00006150| 73 65 20 62 72 69 6e 67 | 20 77 69 6e 64 6f 77 20 |se bring| window |
|00006160| 74 6f 20 66 72 6f 6e 74 | 20 69 66 20 74 68 65 20 |to front| if the |
|00006170| 6d 6f 75 73 65 0d 09 09 | 20 2a 20 69 73 20 61 6c |mouse...| * is al|
|00006180| 72 65 61 64 79 20 75 70 | 20 62 79 20 74 68 65 20 |ready up| by the |
|00006190| 74 69 6d 65 20 44 72 61 | 67 57 69 6e 64 6f 77 28 |time Dra|gWindow(|
|000061a0| 29 20 69 73 20 63 61 6c | 6c 65 64 2e 20 20 53 6f |) is cal|led. So|
|000061b0| 20 74 68 65 0d 09 09 20 | 2a 20 77 69 6e 64 6f 77 | the... |* window|
|000061c0| 20 69 73 20 73 65 6c 65 | 63 74 65 64 20 66 69 72 | is sele|cted fir|
|000061d0| 73 74 20 74 6f 20 6d 61 | 6b 65 20 73 75 72 65 20 |st to ma|ke sure |
|000061e0| 69 74 27 73 20 61 74 20 | 6c 65 61 73 74 0d 09 09 |it's at |least...|
|000061f0| 20 2a 20 61 63 74 69 76 | 61 74 65 64 20 28 75 6e | * activ|ated (un|
|00006200| 6c 65 73 73 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |less the| command|
|00006210| 20 6b 65 79 20 69 73 20 | 64 6f 77 6e 2c 20 49 4d | key is |down, IM|
|00006220| 20 49 2d 32 38 39 29 2e | 0d 09 09 20 2a 0d 09 09 | I-289).|... *...|
|00006230| 20 2a 20 41 6c 73 6f 20 | 6f 66 66 73 65 74 20 74 | * Also |offset t|
|00006240| 68 65 20 77 69 6e 64 6f | 77 27 73 20 75 73 65 72 |he windo|w's user|
|00006250| 53 74 61 74 65 20 62 79 | 20 74 68 65 20 61 6d 6f |State by| the amo|
|00006260| 75 6e 74 20 6f 66 20 74 | 68 65 20 64 72 61 67 0d |unt of t|he drag.|
|00006270| 09 09 20 2a 20 28 69 74 | 27 64 20 62 65 20 73 69 |.. * (it|'d be si|
|00006280| 6d 70 6c 65 72 20 74 6f | 20 73 65 74 20 69 74 20 |mpler to| set it |
|00006290| 74 6f 20 74 68 65 20 66 | 69 6e 61 6c 20 63 6f 6e |to the f|inal con|
|000062a0| 74 65 6e 74 20 72 65 63 | 74 20 62 75 74 20 74 68 |tent rec|t but th|
|000062b0| 65 0d 09 09 20 2a 20 77 | 69 6e 64 6f 77 20 6d 69 |e... * w|indow mi|
|000062c0| 67 68 74 20 62 65 20 69 | 6e 20 7a 6f 6f 6d 65 64 |ght be i|n zoomed|
|000062d0| 20 73 74 61 74 65 20 72 | 61 74 68 65 72 20 74 68 | state r|ather th|
|000062e0| 61 6e 20 75 73 65 72 20 | 73 74 61 74 65 29 2e 0d |an user |state)..|
|000062f0| 09 09 20 2a 2f 0d 09 09 | 63 61 73 65 20 69 6e 44 |.. */...|case inD|
|00006300| 72 61 67 3a 0d 09 09 09 | 69 66 20 28 65 76 74 50 |rag:....|if (evtP|
|00006310| 6f 72 74 20 21 3d 20 66 | 72 6f 6e 74 57 69 6e 64 |ort != f|rontWind|
|00006320| 20 26 26 20 28 65 76 74 | 4d 6f 64 73 20 26 20 63 | && (evt|Mods & c|
|00006330| 6d 64 4b 65 79 29 20 3d | 3d 20 30 29 0d 09 09 09 |mdKey) =|= 0)....|
|00006340| 09 53 65 6c 65 63 74 57 | 69 6e 64 6f 77 20 28 65 |.SelectW|indow (e|
|00006350| 76 74 50 6f 72 74 29 3b | 0d 09 09 09 53 6b 65 6c |vtPort);|....Skel|
|00006360| 47 65 74 57 69 6e 64 43 | 6f 6e 74 65 6e 74 52 65 |GetWindC|ontentRe|
|00006370| 63 74 20 28 65 76 74 50 | 6f 72 74 2c 20 26 72 31 |ct (evtP|ort, &r1|
|00006380| 29 3b 09 09 2f 2a 20 70 | 6f 73 74 2d 64 72 61 67 |);../* p|ost-drag|
|00006390| 20 70 6f 73 69 74 69 6f | 6e 20 2a 2f 0d 09 09 09 | positio|n */....|
|000063a0| 44 72 61 67 57 69 6e 64 | 6f 77 20 28 65 76 74 50 |DragWind|ow (evtP|
|000063b0| 6f 72 74 2c 20 65 76 74 | 50 74 2c 20 26 64 72 61 |ort, evt|Pt, &dra|
|000063c0| 67 52 65 63 74 29 3b 0d | 09 09 09 53 6b 65 6c 47 |gRect);.|...SkelG|
|000063d0| 65 74 57 69 6e 64 43 6f | 6e 74 65 6e 74 52 65 63 |etWindCo|ntentRec|
|000063e0| 74 20 28 65 76 74 50 6f | 72 74 2c 20 26 72 32 29 |t (evtPo|rt, &r2)|
|000063f0| 3b 09 09 2f 2a 20 70 6f | 73 74 2d 64 72 61 67 20 |;../* po|st-drag |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.